Fixed VPhysics

This commit is contained in:
unknown 2024-09-14 18:03:25 +02:00
parent 72aea29a34
commit 6c3d98b6f9
4 changed files with 15 additions and 9 deletions

View file

@ -2062,6 +2062,11 @@ void C_BasePlayer::PostThink( void )
// Even if dead simulate entities
SimulatePlayerSimulatedEntities();
if ( GetCheckUntouch() )
{
PhysicsCheckForEntityUntouch();
}
#endif
}

View file

@ -4620,10 +4620,6 @@ void CBasePlayer::PostThink()
m_Local.m_vecPunchAngle = RandomAngle( -25, 25 );
m_Local.m_vecPunchAngleVel.Init();
}
VPROF_SCOPE_BEGIN( "CBasePlayer::PostThink-PostThinkVPhysics" );
PostThinkVPhysics();
VPROF_SCOPE_END();
}
#if !defined( NO_ENTITY_PREDICTION )
@ -4631,6 +4627,10 @@ void CBasePlayer::PostThink()
SimulatePlayerSimulatedEntities();
#endif
if ( GetCheckUntouch() )
{
PhysicsCheckForEntityUntouch();
}
}
// handles touching physics objects

View file

@ -495,6 +495,12 @@ void CPlayerMove::RunCommand ( CBasePlayer *player, CUserCmd *ucmd, IMoveHelper
FinishInterpolatingPlayer( player );
// This needs to be there because it cannot get an interpolated camera position.
// Technically this is movement data and needs to be seperated from PostThink.
VPROF_SCOPE_BEGIN( "CBasePlayer::PostThink-PostThinkVPhysics" );
player->PostThinkVPhysics();
VPROF_SCOPE_END();
ServiceEventQueue( player );
g_pGameMovement->FinishTrackPredictionErrors( player );

View file

@ -229,11 +229,6 @@ void CBasePlayer::ItemPostFrame()
{
VPROF( "CBasePlayer::ItemPostFrame" );
if ( GetCheckUntouch() )
{
PhysicsCheckForEntityUntouch();
}
// Put viewmodels into basically correct place based on new player origin
CalcViewModelView( EyePosition(), EyeAngles() );