Skip to content

Commit

Permalink
game: fixes some player's origin displacements for fire events, impul…
Browse files Browse the repository at this point in the history
…ses commands etc... (ValveSoftware/source-sdk-2013#442)
  • Loading branch information
SanyaSho committed Aug 16, 2022
1 parent 0a55a71 commit d90d4ab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions game/client/prediction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
10 changes: 5 additions & 5 deletions game/server/player_command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand All @@ -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 );
Expand Down

0 comments on commit d90d4ab

Please sign in to comment.