From 08480942287790be085eb52fcecce7eaab296898 Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 28 Jun 2023 20:08:31 +0100 Subject: [PATCH] Prevent view pitching weirdly at times when using AllowPitchOverride --- source/games/duke/src/player_d.cpp | 3 ++- source/games/duke/src/player_r.cpp | 3 ++- source/games/exhumed/src/player.cpp | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/source/games/duke/src/player_d.cpp b/source/games/duke/src/player_d.cpp index 325abd53f..d9aa54919 100644 --- a/source/games/duke/src/player_d.cpp +++ b/source/games/duke/src/player_d.cpp @@ -3120,7 +3120,8 @@ HORIZONLY: } else if (SyncInput()) { - p->GetActor()->spr.Angles.Pitch += GetPlayerHorizon(snum); + //Set pitch directly + p->GetActor()->spr.Angles.Pitch = GetPlayerHorizon(snum); } p->Angles.doPitchKeys(&p->sync); diff --git a/source/games/duke/src/player_r.cpp b/source/games/duke/src/player_r.cpp index 161b3d356..7f60c0ee5 100644 --- a/source/games/duke/src/player_r.cpp +++ b/source/games/duke/src/player_r.cpp @@ -3926,7 +3926,8 @@ HORIZONLY: } else if (SyncInput()) { - p->GetActor()->spr.Angles.Pitch += GetPlayerHorizon(snum); + //Set pitch directly + p->GetActor()->spr.Angles.Pitch = GetPlayerHorizon(snum); } p->Angles.doPitchKeys(&p->sync); diff --git a/source/games/exhumed/src/player.cpp b/source/games/exhumed/src/player.cpp index 6d5dd3592..96e94569b 100644 --- a/source/games/exhumed/src/player.cpp +++ b/source/games/exhumed/src/player.cpp @@ -2465,7 +2465,8 @@ sectdone: if (SyncInput()) { - pPlayer->pActor->spr.Angles.Pitch += DAngle::fromDeg(PlayerList[nPlayer].input.horz); + //Set pitch directly + pPlayer->pActor->spr.Angles.Pitch = DAngle::fromDeg(PlayerList[nPlayer].input.horz); } pPlayer->Angles.doPitchKeys(&PlayerList[nLocalPlayer].input);