Skip to content

Commit

Permalink
- Exhumed: Make SB_CENTERVIEW work properly when cl_syncinput 1 i…
Browse files Browse the repository at this point in the history
…s set.
  • Loading branch information
mjr4077au committed Apr 19, 2021
1 parent 4eaf05d commit 1daa346
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions source/games/exhumed/src/player.cpp
Expand Up @@ -2638,27 +2638,21 @@ void FuncPlayer(int a, int nDamage, int nRun)

Player* pPlayer = &PlayerList[nPlayer];

if (actions & (SB_LOOK_UP | SB_LOOK_DOWN))
{
pPlayer->nDestVertPan = pPlayer->horizon.horiz;
pPlayer->bPlayerPan = pPlayer->bLockPan = true;
}
else if (actions & (SB_AIM_UP | SB_AIM_DOWN | SB_CENTERVIEW))
{
pPlayer->nDestVertPan = pPlayer->horizon.horiz;
pPlayer->bPlayerPan = pPlayer->bLockPan = false;
}

if (SyncInput())
{
sethorizon(&pPlayer->horizon, sPlayerInput[nPlayer].pan, &sPlayerInput[nLocalPlayer].actions);
}

if (sPlayerInput[nPlayer].pan)
if (actions & (SB_LOOK_UP | SB_LOOK_DOWN) || sPlayerInput[nPlayer].pan)
{
pPlayer->nDestVertPan = pPlayer->horizon.horiz;
pPlayer->bPlayerPan = pPlayer->bLockPan = true;
}
else if (actions & (SB_AIM_UP | SB_AIM_DOWN | SB_CENTERVIEW))
{
pPlayer->nDestVertPan = pPlayer->horizon.horiz;
pPlayer->bPlayerPan = pPlayer->bLockPan = false;
}

if (totalvel[nPlayer] > 20)
{
Expand Down

0 comments on commit 1daa346

Please sign in to comment.