Browse Source

Fix underwater breathing sounds when player not fully in the water. Same as https://github.com/ValveSoftware/halflife/issues/3110.

hl_urbicide
Andrey Akhmichin 4 years ago
parent
commit
8c45ae9bb2
  1. 3
      dlls/player.cpp

3
dlls/player.cpp

@ -1198,6 +1198,8 @@ void CBasePlayer::WaterMove()
} }
// make bubbles // make bubbles
if( pev->waterlevel == 3 )
{
air = (int)( pev->air_finished - gpGlobals->time ); air = (int)( pev->air_finished - gpGlobals->time );
if( !RANDOM_LONG( 0, 0x1f ) && RANDOM_LONG( 0, AIRTIME - 1 ) >= air ) if( !RANDOM_LONG( 0, 0x1f ) && RANDOM_LONG( 0, AIRTIME - 1 ) >= air )
{ {
@ -1217,6 +1219,7 @@ void CBasePlayer::WaterMove()
break; break;
} }
} }
}
if( pev->watertype == CONTENT_LAVA ) // do damage if( pev->watertype == CONTENT_LAVA ) // do damage
{ {

Loading…
Cancel
Save