mirror of
https://github.com/fortressforever/fortressforever-2013.git
synced 2024-11-22 12:32:08 +00:00
Fixed an issue when trying to get out of water.
This commit is contained in:
parent
88e40d9bc9
commit
df82d96409
1 changed files with 3 additions and 10 deletions
|
@ -2080,26 +2080,19 @@ void CGameMovement::FullWalkMove( )
|
||||||
TryPlayerMove();
|
TryPlayerMove();
|
||||||
// See if we are still in water?
|
// See if we are still in water?
|
||||||
CheckWater();
|
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
|
// 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
|
// 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 )
|
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();
|
CheckWaterJump();
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we are falling again, then we must not trying to jump out of water any more.
|
// If we are falling again, then we must not trying to jump out of water any more.
|
||||||
if ( mv->m_vecVelocity[2] < 0 &&
|
if ( mv->m_vecVelocity[2] < 0 &&
|
||||||
player->m_flWaterJumpTime )
|
player->m_flWaterJumpTime )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue