Fixed an issue when trying to get out of water.

This commit is contained in:
hlstriker 2013-11-03 07:48:55 +00:00 committed by squeek
parent 88e40d9bc9
commit df82d96409

View file

@ -2080,21 +2080,14 @@ void CGameMovement::FullWalkMove( )
TryPlayerMove();
// See if we are still in water?
CheckWater();
// FF --> hlstriker: Make sure player isn't swimming before we return
if( player->GetWaterLevel() < WL_Waist )
{
player->m_flWaterJumpTime = 0;
return;
}
// FF <--
}
// If we are swimming in the water, see if we are nudging against a place we can jump up out
// of, and, if so, start out jump. Otherwise, if we are not moving up, then reset jump timer to 0
if ( player->GetWaterLevel() >= WL_Waist )
{
if ( player->GetWaterLevel() == WL_Waist )
if ( player->GetWaterLevel() == WL_Waist
&& mv->m_vecVelocity[2] > 0 ) // FF --> hlstriker: Make sure the player is actually moving upwards before trying to jump out of water.
{
CheckWaterJump();
}