Browse Source

game: fixes some player's origin displacements for fire events, impulses commands etc... (ValveSoftware/source-sdk-2013#442)

pull/112/head
SanyaSho 2 years ago
parent
commit
2e969d3890
  1. 4
      game/client/prediction.cpp
  2. 10
      game/server/player_command.cpp

4
game/client/prediction.cpp

@ -903,10 +903,10 @@ void CPrediction::RunCommand( C_BasePlayer *player, CUserCmd *ucmd, IMoveHelper @@ -903,10 +903,10 @@ void CPrediction::RunCommand( C_BasePlayer *player, CUserCmd *ucmd, IMoveHelper
pVehicle->ProcessMovement( player, g_pMoveData );
}
FinishMove( player, ucmd, g_pMoveData );
RunPostThink( player );
FinishMove( player, ucmd, g_pMoveData );
g_pGameMovement->FinishTrackPredictionErrors( player );
FinishCommand( player );

10
game/server/player_command.cpp

@ -417,6 +417,11 @@ void CPlayerMove::RunCommand ( CBasePlayer *player, CUserCmd *ucmd, IMoveHelper @@ -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 );
@ -442,11 +447,6 @@ void CPlayerMove::RunCommand ( CBasePlayer *player, CUserCmd *ucmd, IMoveHelper @@ -442,11 +447,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();
RunPostThink( player );
g_pGameMovement->FinishTrackPredictionErrors( player );

Loading…
Cancel
Save