From 178cf40428efaef3888904f592be9dbb831ec5f8 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Tue, 3 Mar 2020 22:50:01 -0500 Subject: [PATCH] - fix debug assertion, cleanup vestigial A_PlaySound addition --- src/scripting/vmthunks_actors.cpp | 2 +- src/sound/s_doomsound.cpp | 4 ++-- src/sound/s_doomsound.h | 2 +- wadsrc/static/zscript/base.zs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/scripting/vmthunks_actors.cpp b/src/scripting/vmthunks_actors.cpp index bf058d479..e90184031 100644 --- a/src/scripting/vmthunks_actors.cpp +++ b/src/scripting/vmthunks_actors.cpp @@ -179,7 +179,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(AActor, A_PlaySound, A_PlaySound) PARAM_FLOAT(attenuation); PARAM_BOOL(local); PARAM_FLOAT(pitch); - A_PlaySound(self, soundid, channel, volume, looping, attenuation, local, pitch, 0.0f); + A_PlaySound(self, soundid, channel, volume, looping, attenuation, local, pitch); return 0; } diff --git a/src/sound/s_doomsound.cpp b/src/sound/s_doomsound.cpp index 282bf15e3..48f094f81 100644 --- a/src/sound/s_doomsound.cpp +++ b/src/sound/s_doomsound.cpp @@ -479,11 +479,11 @@ void A_StartSound(AActor *self, int soundid, int channel, int flags, double volu S_PlaySoundPitch(self, channel, EChanFlags::FromInt(flags), soundid, (float)volume, (float)attenuation, (float)pitch, (float)startTime); } -void A_PlaySound(AActor* self, int soundid, int channel, double volume, int looping, double attenuation, int local, double pitch, double startTime) +void A_PlaySound(AActor* self, int soundid, int channel, double volume, int looping, double attenuation, int local, double pitch) { if (looping) channel |= CHANF_LOOP | CHANF_NOSTOP; if (local) channel |= CHANF_LOCAL; - A_StartSound(self, soundid, channel & 7, channel & ~7, volume, attenuation, pitch, startTime); + A_StartSound(self, soundid, channel & 7, channel & ~7, volume, attenuation, pitch, 0.0f); } diff --git a/src/sound/s_doomsound.h b/src/sound/s_doomsound.h index 584700ef2..2ea833dc0 100644 --- a/src/sound/s_doomsound.h +++ b/src/sound/s_doomsound.h @@ -56,7 +56,7 @@ void S_ChangeActorSoundPitch(AActor *actor, int channel, double pitch); // Stores/retrieves playing channel information in an archive. void S_SerializeSounds(FSerializer &arc); -void A_PlaySound(AActor *self, int soundid, int channel, double volume, int looping, double attenuation, int local, double pitch, double startTime = 0.); +void A_PlaySound(AActor *self, int soundid, int channel, double volume, int looping, double attenuation, int local, double pitch); void A_StartSound(AActor* self, int soundid, int channel, int flags, double volume, double attenuation, double pitch, double startTime = 0.); static void S_SetListener(AActor *listenactor); void S_SoundReset(); diff --git a/wadsrc/static/zscript/base.zs b/wadsrc/static/zscript/base.zs index beb170470..8e3cc5675 100644 --- a/wadsrc/static/zscript/base.zs +++ b/wadsrc/static/zscript/base.zs @@ -445,7 +445,7 @@ class Object native return level.PickPlayerStart(pnum, flags); } deprecated("4.3") native static void S_Sound (Sound sound_id, int channel, float volume = 1, float attenuation = ATTN_NORM, float pitch = 0.0); - native static void S_StartSound (Sound sound_id, int channel, int flags = 0, float volume = 1, float attenuation = ATTN_NORM, float pitch = 0.0); + native static void S_StartSound (Sound sound_id, int channel, int flags = 0, float volume = 1, float attenuation = ATTN_NORM, float pitch = 0.0, float startTime = 0.0); native static void S_PauseSound (bool notmusic, bool notsfx); native static void S_ResumeSound (bool notsfx); native static bool S_ChangeMusic(String music_name, int order = 0, bool looping = true, bool force = false);