- fix function pointer for player landing sound

This commit is contained in:
Rachael Alexanderson 2022-02-24 17:20:39 -05:00
parent 36629d2f80
commit 254da4b769

View file

@ -198,7 +198,14 @@ DEFINE_ACTION_FUNCTION_NATIVE(AActor, A_StartSound, A_StartSound)
return 0; return 0;
} }
DEFINE_ACTION_FUNCTION_NATIVE(AActor, A_StartSoundIfNotSame, A_StartSound)
void A_StartSoundIfNotSame(AActor *self, int soundid, int checksoundid, int channel, int flags, double volume, double attenuation, double pitch, double startTime)
{
if (!S_AreSoundsEquivalent (self, soundid, checksoundid))
A_StartSound(self, soundid, channel, flags, volume, attenuation, pitch, startTime);
}
DEFINE_ACTION_FUNCTION_NATIVE(AActor, A_StartSoundIfNotSame, A_StartSoundIfNotSame)
{ {
PARAM_SELF_PROLOGUE(AActor); PARAM_SELF_PROLOGUE(AActor);
PARAM_SOUND(soundid); PARAM_SOUND(soundid);
@ -209,8 +216,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(AActor, A_StartSoundIfNotSame, A_StartSound)
PARAM_FLOAT(attenuation); PARAM_FLOAT(attenuation);
PARAM_FLOAT(pitch); PARAM_FLOAT(pitch);
PARAM_FLOAT(startTime); PARAM_FLOAT(startTime);
if (!S_AreSoundsEquivalent (self, soundid, checksoundid)) A_StartSoundIfNotSame(self, soundid, checksoundid, channel, flags, volume, attenuation, pitch, startTime);
A_StartSound(self, soundid, channel, flags, volume, attenuation, pitch, startTime);
return 0; return 0;
} }