- Duke: Repair SB_CENTERVIEW not re-applying on the first tic.

This commit is contained in:
Mitchell Richters 2023-10-04 09:27:15 +11:00
parent fd07347bce
commit 686b121e45
3 changed files with 7 additions and 1 deletions

View file

@ -32,3 +32,8 @@ public:
};
extern DCorePlayer* PlayerArray[MAXPLAYERS];
inline ESyncBits GetPersistentActions()
{
return PlayerArray[myconnectindex]->cmd.ucmd.actions & SB_CENTERVIEW;
}

View file

@ -272,7 +272,7 @@ void GameInput::processInputBits()
else dpad_lock = 0;
const auto crouchState = gi->getCrouchState();
inputBuffer.actions |= ActionsToSend | (PlayerArray[myconnectindex]->cmd.ucmd.actions & SB_CENTERVIEW);
inputBuffer.actions |= ActionsToSend | GetPersistentActions();
ActionsToSend = 0;
if (buttonMap.ButtonDown(gamefunc_Aim_Up) || (buttonMap.ButtonDown(gamefunc_Dpad_Aiming) && joyAxes[JOYAXIS_Forward] > 0))

View file

@ -275,6 +275,7 @@ static void GameTicker()
Net_ClearFifo();
inputState.ClearAllInput();
gameInput.Clear();
gameInput.SendAction(GetPersistentActions());
gamestate = GS_LEVEL;
return;