mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2026-01-25 00:32:37 +01:00
Fix prediction error when crouchjumping
This commit is contained in:
@@ -4011,6 +4011,18 @@ void CGameMovement::PlayerRoughLandingEffects( float fvol )
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Reset interpolation when player duck state changes
|
||||
// Input : direction -
|
||||
//-----------------------------------------------------------------------------
|
||||
void CGameMovement::ResetDuckLatched()
|
||||
{
|
||||
#ifdef CLIENT_DLL
|
||||
if ( !player->InFirstPersonView() )
|
||||
player->ResetLatched();
|
||||
#endif
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Use for ease-in, ease-out style interpolation (accel/decel) Used by ducking code.
|
||||
// Input : value -
|
||||
@@ -4133,9 +4145,7 @@ void CGameMovement::FinishUnDuck( void )
|
||||
|
||||
mv->SetAbsOrigin( newOrigin );
|
||||
|
||||
#ifdef CLIENT_DLL
|
||||
player->ResetLatched();
|
||||
#endif // CLIENT_DLL
|
||||
ResetDuckLatched();
|
||||
|
||||
// Recategorize position since ducking can change origin
|
||||
CategorizePosition();
|
||||
@@ -4232,9 +4242,7 @@ void CGameMovement::FinishDuck( void )
|
||||
VectorAdd( mv->GetAbsOrigin(), viewDelta, out );
|
||||
mv->SetAbsOrigin( out );
|
||||
|
||||
#ifdef CLIENT_DLL
|
||||
player->ResetLatched();
|
||||
#endif // CLIENT_DLL
|
||||
ResetDuckLatched();
|
||||
}
|
||||
|
||||
// See if we are stuck?
|
||||
|
||||
@@ -227,6 +227,7 @@ protected:
|
||||
void FinishUnDuckJump( trace_t &trace );
|
||||
void SetDuckedEyeOffset( float duckFraction );
|
||||
void FixPlayerCrouchStuck( bool moveup );
|
||||
void ResetDuckLatched();
|
||||
|
||||
float SplineFraction( float value, float scale );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user