mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
Don't assign result of A_PlaySound() to p->scream_voice if the former is >127.
Because p->scream_voice is an int8_t. This is an unlikely situation (126 voices ought to be playing simultaneously while starting the "scream" sound), but still... git-svn-id: https://svn.eduke32.com/eduke32@4180 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
b6efd5e57e
commit
8ab35ec520
1 changed files with 5 additions and 1 deletions
|
@ -4749,7 +4749,11 @@ void P_ProcessInput(int32_t snum)
|
|||
{
|
||||
p->falling_counter++;
|
||||
if (p->falling_counter >= 38 && p->scream_voice <= FX_Ok)
|
||||
p->scream_voice = A_PlaySound(DUKE_SCREAM,p->i);
|
||||
{
|
||||
int32_t voice = A_PlaySound(DUKE_SCREAM,p->i);
|
||||
if (voice <= 127) // XXX: p->scream_voice is an int8_t
|
||||
p->scream_voice = voice;
|
||||
}
|
||||
}
|
||||
|
||||
if ((p->pos.z+p->vel.z) >= (fz-(i<<8)) && p->cursectnum >= 0) // hit the ground
|
||||
|
|
Loading…
Reference in a new issue