From 776c58c58ac8f2c78126308afa6a0939a0fd8d8b Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sun, 26 Mar 2023 14:36:12 +1100 Subject: [PATCH] - Duke: If we enter `playerCenterView()` and put `SB_CENTERVIEW()` back on, we need to null and lock input. --- source/games/duke/src/player.cpp | 2 ++ source/games/duke/src/types.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/source/games/duke/src/player.cpp b/source/games/duke/src/player.cpp index b31fce45b..90c4d605b 100644 --- a/source/games/duke/src/player.cpp +++ b/source/games/duke/src/player.cpp @@ -876,6 +876,8 @@ void playerCenterView(int snum) if (GetGameVarID(g_iReturnVarID, p->GetActor(), snum).value() == 0) { p->sync.actions |= SB_CENTERVIEW; + p->sync.horz = 0; + setForcedSyncInput(snum); } else { diff --git a/source/games/duke/src/types.h b/source/games/duke/src/types.h index b51124d4c..1383ac7a5 100644 --- a/source/games/duke/src/types.h +++ b/source/games/duke/src/types.h @@ -351,7 +351,7 @@ struct player_struct return; const bool returnlock = cl_dukepitchmode & kDukePitchLockReturn; - const bool centertest = abs(GetActor()->spr.Angles.Pitch.Degrees()) > 2.2370; + const bool centertest = abs(GetActor()->spr.Angles.Pitch.Degrees()) > 2.2370; // Build horizon value of 5. if ((centertest && returnlock) || !sync.horz) {