Use local functions instead of absolute for prediction and server
This commit is contained in:
parent
413264e208
commit
18647ad6d5
2 changed files with 9 additions and 9 deletions
|
@ -625,14 +625,14 @@ void CPrediction::SetupMove( C_BasePlayer *player, CUserCmd *ucmd, IMoveHelper *
|
|||
move->m_bFirstRunOfFunctions = IsFirstTimePredicted();
|
||||
|
||||
move->m_bGameCodeMovedPlayer = false;
|
||||
if ( player->GetPreviouslyPredictedOrigin() != player->GetNetworkOrigin() )
|
||||
if ( player->GetPreviouslyPredictedOrigin() != player->GetLocalOrigin() )
|
||||
{
|
||||
move->m_bGameCodeMovedPlayer = true;
|
||||
}
|
||||
|
||||
move->m_nPlayerHandle = player->GetClientHandle();
|
||||
move->m_vecVelocity = player->GetAbsVelocity();
|
||||
move->SetAbsOrigin( player->GetNetworkOrigin() );
|
||||
move->SetAbsOrigin( player->GetLocalOrigin() );
|
||||
move->m_vecOldAngles = move->m_vecAngles;
|
||||
move->m_nOldButtons = player->m_Local.m_nOldButtons;
|
||||
move->m_flClientMaxSpeed = player->m_flMaxspeed;
|
||||
|
@ -678,7 +678,7 @@ void CPrediction::SetupMove( C_BasePlayer *player, CUserCmd *ucmd, IMoveHelper *
|
|||
|
||||
// Copy constraint information
|
||||
if ( player->m_hConstraintEntity )
|
||||
move->m_vecConstraintCenter = player->m_hConstraintEntity->GetAbsOrigin();
|
||||
move->m_vecConstraintCenter = player->m_hConstraintEntity->GetLocalOrigin();
|
||||
else
|
||||
move->m_vecConstraintCenter = player->m_vecConstraintCenter;
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ void CPlayerMove::SetupMove( CBasePlayer *player, CUserCmd *ucmd, IMoveHelper *p
|
|||
// Allow sound, etc. to be created by movement code
|
||||
move->m_bFirstRunOfFunctions = true;
|
||||
move->m_bGameCodeMovedPlayer = false;
|
||||
if ( player->GetPreviouslyPredictedOrigin() != player->GetAbsOrigin() )
|
||||
if ( player->GetPreviouslyPredictedOrigin() != player->GetLocalOrigin() )
|
||||
{
|
||||
move->m_bGameCodeMovedPlayer = true;
|
||||
}
|
||||
|
@ -189,15 +189,15 @@ void CPlayerMove::SetupMove( CBasePlayer *player, CUserCmd *ucmd, IMoveHelper *p
|
|||
move->m_nOldButtons = player->m_Local.m_nOldButtons;
|
||||
move->m_vecAngles = player->pl.v_angle;
|
||||
|
||||
move->m_vecVelocity = player->GetAbsVelocity();
|
||||
move->m_vecVelocity = player->GetLocalVelocity();
|
||||
|
||||
move->m_nPlayerHandle = player;
|
||||
|
||||
move->SetAbsOrigin( player->GetAbsOrigin() );
|
||||
move->SetAbsOrigin( player->GetLocalOrigin() );
|
||||
|
||||
// Copy constraint information
|
||||
if ( player->m_hConstraintEntity.Get() )
|
||||
move->m_vecConstraintCenter = player->m_hConstraintEntity.Get()->GetAbsOrigin();
|
||||
move->m_vecConstraintCenter = player->m_hConstraintEntity.Get()->GetLocalOrigin();
|
||||
else
|
||||
move->m_vecConstraintCenter = player->m_vecConstraintCenter;
|
||||
move->m_flConstraintRadius = player->m_flConstraintRadius;
|
||||
|
@ -218,8 +218,8 @@ void CPlayerMove::FinishMove( CBasePlayer *player, CUserCmd *ucmd, CMoveData *mo
|
|||
|
||||
// NOTE: Don't copy this. the movement code modifies its local copy but is not expecting to be authoritative
|
||||
//player->m_flMaxspeed = move->m_flClientMaxSpeed;
|
||||
player->SetAbsOrigin( move->GetAbsOrigin() );
|
||||
player->SetAbsVelocity( move->m_vecVelocity );
|
||||
player->SetLocalOrigin( move->GetAbsOrigin() );
|
||||
player->SetLocalVelocity( move->m_vecVelocity );
|
||||
player->SetPreviouslyPredictedOrigin( move->GetAbsOrigin() );
|
||||
|
||||
player->m_Local.m_nOldButtons = move->m_nButtons;
|
||||
|
|
Loading…
Reference in a new issue