mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-27 15:15:39 +03:00
CBasePlayer::WaterMove: No water sound playback occurs when clients emerge from network lag or was using noclip
This commit is contained in:
parent
bde6aa07bc
commit
a1af7ca426
@ -3082,11 +3082,16 @@ void CBasePlayer::WaterMove()
|
||||
// not underwater
|
||||
|
||||
// play 'up for air' sound
|
||||
if (pev->air_finished < gpGlobals->time)
|
||||
EMIT_SOUND(ENT(pev), CHAN_VOICE, "player/pl_wade1.wav", VOL_NORM, ATTN_NORM);
|
||||
#ifdef REGAMEDLL_FIXES
|
||||
if (pev->flags & FL_INWATER)
|
||||
#endif
|
||||
{
|
||||
if (pev->air_finished < gpGlobals->time)
|
||||
EMIT_SOUND(ENT(pev), CHAN_VOICE, "player/pl_wade1.wav", VOL_NORM, ATTN_NORM);
|
||||
|
||||
else if (pev->air_finished < gpGlobals->time + 9)
|
||||
EMIT_SOUND(ENT(pev), CHAN_VOICE, "player/pl_wade2.wav", VOL_NORM, ATTN_NORM);
|
||||
else if (pev->air_finished < gpGlobals->time + 9)
|
||||
EMIT_SOUND(ENT(pev), CHAN_VOICE, "player/pl_wade2.wav", VOL_NORM, ATTN_NORM);
|
||||
}
|
||||
|
||||
pev->air_finished = gpGlobals->time + AIRTIME;
|
||||
pev->dmg = 2;
|
||||
|
Loading…
Reference in New Issue
Block a user