From 0b3900df4df05610228dfffdf48a1644134d51b3 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Fri, 25 Nov 2022 14:55:05 +1100 Subject: [PATCH] - Rename `PlayerHorizon::ohorizoff` in preparation for replacement work. --- source/core/gameinput.cpp | 2 +- source/core/gameinput.h | 8 ++++---- source/games/duke/src/gameexec.cpp | 4 ++-- source/games/duke/src/premap.cpp | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/source/core/gameinput.cpp b/source/core/gameinput.cpp index 1275a0c4633..118b6111850 100644 --- a/source/core/gameinput.cpp +++ b/source/core/gameinput.cpp @@ -363,7 +363,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, PlayerHorizon& w, if (arc.isReading()) { w.ZzOLDHORIZON = w.ZzHORIZON; - w.ohorizoff = w.ZzHORIZOFF; + w.ZzOHORIZOFF = w.ZzHORIZOFF; w.inputdisabled = w.inputdisabled; w.resetadjustment(); } diff --git a/source/core/gameinput.h b/source/core/gameinput.h index 8ff83a8a34f..bf30dfb3152 100644 --- a/source/core/gameinput.h +++ b/source/core/gameinput.h @@ -8,7 +8,7 @@ struct PlayerHorizon { - DAngle ZzHORIZON, ZzOLDHORIZON, ZzHORIZOFF, ohorizoff; + DAngle ZzHORIZON, ZzOLDHORIZON, ZzHORIZOFF, ZzOHORIZOFF; friend FSerializer& Serialize(FSerializer& arc, const char* keyname, PlayerHorizon& w, PlayerHorizon* def); @@ -20,16 +20,16 @@ struct PlayerHorizon void backup() { ZzOLDHORIZON = ZzHORIZON; - ohorizoff = ZzHORIZOFF; + ZzOHORIZOFF = ZzHORIZOFF; } void restore() { ZzHORIZON = ZzOLDHORIZON; - ZzHORIZOFF = ohorizoff; + ZzHORIZOFF = ZzOHORIZOFF; } // Commonly used getters. - DAngle osum() { return ZzOLDHORIZON + ohorizoff; } + DAngle osum() { return ZzOLDHORIZON + ZzOHORIZOFF; } DAngle sum() { return ZzHORIZON + ZzHORIZOFF; } DAngle interpolatedsum(double const interpfrac) { return interpolatedvalue(osum(), sum(), interpfrac); } diff --git a/source/games/duke/src/gameexec.cpp b/source/games/duke/src/gameexec.cpp index 0a43d837d67..fea1b76b2cc 100644 --- a/source/games/duke/src/gameexec.cpp +++ b/source/games/duke/src/gameexec.cpp @@ -359,7 +359,7 @@ void DoPlayer(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor, break; case PLAYER_OHORIZOFF: - if (!bSet) SetGameVarID(lVar2, int(ps[iPlayer].horizon.ohorizoff.Tan() * -128.), sActor, sPlayer); + if (!bSet) SetGameVarID(lVar2, int(ps[iPlayer].horizon.ZzOHORIZOFF.Tan() * -128.), sActor, sPlayer); break; case PLAYER_INVDISPTIME: @@ -2250,7 +2250,7 @@ int ParseState::parse(void) ps[g_p].horizon.ZzOLDHORIZON = ps[g_p].horizon.ZzHORIZON = nullAngle; ps[g_p].on_crane = nullptr; ps[g_p].frag_ps = g_p; - ps[g_p].horizon.ohorizoff = ps[g_p].horizon.ZzHORIZOFF = nullAngle; + ps[g_p].horizon.ZzOHORIZOFF = ps[g_p].horizon.ZzHORIZOFF = nullAngle; ps[g_p].opyoff = 0; ps[g_p].wackedbyactor = nullptr; ps[g_p].shield_amount = gs.max_armour_amount; diff --git a/source/games/duke/src/premap.cpp b/source/games/duke/src/premap.cpp index f9ca48baa70..c5f79905875 100644 --- a/source/games/duke/src/premap.cpp +++ b/source/games/duke/src/premap.cpp @@ -126,7 +126,7 @@ void resetplayerstats(int snum) p->footprintshade = 0; p->jumping_toggle = 0; p->horizon.ZzOLDHORIZON = p->horizon.ZzHORIZON = DAngle::fromDeg(-17.354); - p->horizon.ohorizoff = p->horizon.ZzHORIZOFF = nullAngle; + p->horizon.ZzOHORIZOFF = p->horizon.ZzHORIZOFF = nullAngle; p->bobcounter = 0; p->on_ground = 0; p->player_par = 0;