Sometimes teleports wouldn't work because physics impacts were processed before the player's thinkings, fixed it by moving the processed impacts before thinking functions.

This commit is contained in:
Kamay 2017-12-20 22:14:06 +01:00
parent ff47d396cd
commit d370302438
2 changed files with 10 additions and 10 deletions

View File

@ -417,6 +417,11 @@ void CPlayerMove::RunCommand ( CBasePlayer *player, CUserCmd *ucmd, IMoveHelper
{
player->pl.v_angle = ucmd->viewangles + player->pl.anglechange;
}
// Let server invoke any needed impact functions
VPROF_SCOPE_BEGIN( "moveHelper->ProcessImpacts" );
moveHelper->ProcessImpacts();
VPROF_SCOPE_END();
// Call standard client pre-think
RunPreThink( player );
@ -451,11 +456,6 @@ void CPlayerMove::RunCommand ( CBasePlayer *player, CUserCmd *ucmd, IMoveHelper
player->pl.v_angle = player->GetLockViewanglesData();
}
// Let server invoke any needed impact functions
VPROF_SCOPE_BEGIN( "moveHelper->ProcessImpacts" );
moveHelper->ProcessImpacts();
VPROF_SCOPE_END();
g_pGameMovement->FinishTrackPredictionErrors( player );
FinishCommand( player );

View File

@ -416,6 +416,11 @@ void CPlayerMove::RunCommand ( CBasePlayer *player, CUserCmd *ucmd, IMoveHelper
{
player->pl.v_angle = ucmd->viewangles + player->pl.anglechange;
}
// Let server invoke any needed impact functions
VPROF_SCOPE_BEGIN( "moveHelper->ProcessImpacts" );
moveHelper->ProcessImpacts();
VPROF_SCOPE_END();
// Call standard client pre-think
RunPreThink( player );
@ -444,11 +449,6 @@ void CPlayerMove::RunCommand ( CBasePlayer *player, CUserCmd *ucmd, IMoveHelper
// Copy output
FinishMove( player, ucmd, g_pMoveData );
// Let server invoke any needed impact functions
VPROF_SCOPE_BEGIN( "moveHelper->ProcessImpacts" );
moveHelper->ProcessImpacts();
VPROF_SCOPE_END();
g_pGameMovement->FinishTrackPredictionErrors( player );
FinishCommand( player );