mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-28 15:45:41 +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
|
// not underwater
|
||||||
|
|
||||||
// play 'up for air' sound
|
// play 'up for air' sound
|
||||||
if (pev->air_finished < gpGlobals->time)
|
#ifdef REGAMEDLL_FIXES
|
||||||
EMIT_SOUND(ENT(pev), CHAN_VOICE, "player/pl_wade1.wav", VOL_NORM, ATTN_NORM);
|
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)
|
else if (pev->air_finished < gpGlobals->time + 9)
|
||||||
EMIT_SOUND(ENT(pev), CHAN_VOICE, "player/pl_wade2.wav", VOL_NORM, ATTN_NORM);
|
EMIT_SOUND(ENT(pev), CHAN_VOICE, "player/pl_wade2.wav", VOL_NORM, ATTN_NORM);
|
||||||
|
}
|
||||||
|
|
||||||
pev->air_finished = gpGlobals->time + AIRTIME;
|
pev->air_finished = gpGlobals->time + AIRTIME;
|
||||||
pev->dmg = 2;
|
pev->dmg = 2;
|
||||||
|
Loading…
Reference in New Issue
Block a user