- Exhumed: Make SB_CENTERVIEW work properly when cl_syncinput 1 is set.

This commit is contained in:
Mitchell Richters 2021-04-19 20:23:22 +10:00
parent 4eaf05d95e
commit 1daa346fdd

View file

@ -2638,7 +2638,12 @@ loc_1BD2E:
Player* pPlayer = &PlayerList[nPlayer];
if (actions & (SB_LOOK_UP | SB_LOOK_DOWN))
if (SyncInput())
{
sethorizon(&pPlayer->horizon, sPlayerInput[nPlayer].pan, &sPlayerInput[nLocalPlayer].actions);
}
if (actions & (SB_LOOK_UP | SB_LOOK_DOWN) || sPlayerInput[nPlayer].pan)
{
pPlayer->nDestVertPan = pPlayer->horizon.horiz;
pPlayer->bPlayerPan = pPlayer->bLockPan = true;
@ -2649,17 +2654,6 @@ loc_1BD2E:
pPlayer->bPlayerPan = pPlayer->bLockPan = false;
}
if (SyncInput())
{
sethorizon(&pPlayer->horizon, sPlayerInput[nPlayer].pan, &sPlayerInput[nLocalPlayer].actions);
}
if (sPlayerInput[nPlayer].pan)
{
pPlayer->nDestVertPan = pPlayer->horizon.horiz;
pPlayer->bPlayerPan = pPlayer->bLockPan = true;
}
if (totalvel[nPlayer] > 20)
{
pPlayer->bPlayerPan = false;