diff --git a/source/core/gameinput.cpp b/source/core/gameinput.cpp index 26521fb2f..169685b37 100644 --- a/source/core/gameinput.cpp +++ b/source/core/gameinput.cpp @@ -364,7 +364,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, PlayerHorizon& w, if (arc.isReading()) { - w.ohoriz = w.ZzHORIZON; + w.ZzOLDHORIZON = w.ZzHORIZON; w.ohorizoff = w.horizoff; w.inputdisabled = w.inputdisabled; w.resetadjustment(); diff --git a/source/core/gameinput.h b/source/core/gameinput.h index bb0bf21d1..c74cd2ec1 100644 --- a/source/core/gameinput.h +++ b/source/core/gameinput.h @@ -8,7 +8,7 @@ struct PlayerHorizon { - DAngle ZzHORIZON, ohoriz, horizoff, ohorizoff; + DAngle ZzHORIZON, ZzOLDHORIZON, horizoff, ohorizoff; friend FSerializer& Serialize(FSerializer& arc, const char* keyname, PlayerHorizon& w, PlayerHorizon* def); @@ -19,17 +19,17 @@ struct PlayerHorizon // Interpolation helpers. void backup() { - ohoriz = ZzHORIZON; + ZzOLDHORIZON = ZzHORIZON; ohorizoff = horizoff; } void restore() { - ZzHORIZON = ohoriz; + ZzHORIZON = ZzOLDHORIZON; horizoff = ohorizoff; } // Commonly used getters. - DAngle osum() { return ohoriz + ohorizoff; } + DAngle osum() { return ZzOLDHORIZON + ohorizoff; } DAngle sum() { return ZzHORIZON + horizoff; } DAngle interpolatedsum(double const interpfrac) { return interpolatedvalue(osum(), sum(), interpfrac); } @@ -67,7 +67,7 @@ struct PlayerHorizon else { ZzHORIZON = value; - if (backup) ohoriz = ZzHORIZON; + if (backup) ZzOLDHORIZON = ZzHORIZON; } } diff --git a/source/games/duke/src/gameexec.cpp b/source/games/duke/src/gameexec.cpp index c15a4e06a..3b71fbe30 100644 --- a/source/games/duke/src/gameexec.cpp +++ b/source/games/duke/src/gameexec.cpp @@ -350,7 +350,7 @@ void DoPlayer(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor, break; case PLAYER_OHORIZ: - if (!bSet) SetGameVarID(lVar2, int(ps[iPlayer].horizon.ohoriz.Tan() * -128.), sActor, sPlayer); + if (!bSet) SetGameVarID(lVar2, int(ps[iPlayer].horizon.ZzOLDHORIZON.Tan() * -128.), sActor, sPlayer); break; case PLAYER_HORIZOFF: @@ -2247,7 +2247,7 @@ int ParseState::parse(void) ps[g_p].last_extra = g_ac->spr.extra = gs.max_player_health; ps[g_p].wantweaponfire = -1; - ps[g_p].horizon.ohoriz = ps[g_p].horizon.ZzHORIZON = nullAngle; + 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.horizoff = nullAngle; diff --git a/source/games/duke/src/premap.cpp b/source/games/duke/src/premap.cpp index 874bc83f6..34c55b660 100644 --- a/source/games/duke/src/premap.cpp +++ b/source/games/duke/src/premap.cpp @@ -125,7 +125,7 @@ void resetplayerstats(int snum) p->footprintpal = 0; p->footprintshade = 0; p->jumping_toggle = 0; - p->horizon.ohoriz = p->horizon.ZzHORIZON = DAngle::fromDeg(-17.354); + p->horizon.ZzOLDHORIZON = p->horizon.ZzHORIZON = DAngle::fromDeg(-17.354); p->horizon.ohorizoff = p->horizon.horizoff = nullAngle; p->bobcounter = 0; p->on_ground = 0; diff --git a/source/games/exhumed/src/player.cpp b/source/games/exhumed/src/player.cpp index c60dcd582..48b0aae76 100644 --- a/source/games/exhumed/src/player.cpp +++ b/source/games/exhumed/src/player.cpp @@ -407,7 +407,7 @@ void RestartPlayer(int nPlayer) plr->nThrust.Zero(); - plr->nDestVertPan = plr->horizon.ohoriz = plr->horizon.ZzHORIZON = nullAngle; + plr->nDestVertPan = plr->horizon.ZzOLDHORIZON = plr->horizon.ZzHORIZON = nullAngle; plr->nBreathTimer = 90; plr->nTauntTimer = RandomSize(3) + 3; @@ -503,7 +503,7 @@ void StartDeathSeq(int nPlayer, int nVal) StopFiringWeapon(nPlayer); - PlayerList[nPlayer].horizon.ohoriz = PlayerList[nPlayer].horizon.ZzHORIZON = nullAngle; + PlayerList[nPlayer].horizon.ZzOLDHORIZON = PlayerList[nPlayer].horizon.ZzHORIZON = nullAngle; pActor->oviewzoffset = pActor->viewzoffset = -55; PlayerList[nPlayer].nInvisible = 0; dVertPan[nPlayer] = 15; diff --git a/source/games/sw/src/player.cpp b/source/games/sw/src/player.cpp index e96caa958..c1809d169 100644 --- a/source/games/sw/src/player.cpp +++ b/source/games/sw/src/player.cpp @@ -7048,7 +7048,7 @@ void InitAllPlayers(void) for (pp = Player; pp < &Player[MAX_SW_PLAYERS]; pp++) { pp->angle.ang = pp->angle.oang = pfirst->angle.ang; - pp->horizon.ZzHORIZON = pp->horizon.ohoriz = pfirst->horizon.ZzHORIZON; + pp->horizon.ZzHORIZON = pp->horizon.ZzOLDHORIZON = pfirst->horizon.ZzHORIZON; pp->cursector = pfirst->cursector; // set like this so that player can trigger something on start of the level pp->lastcursector = pfirst->cursector+1;