From 401a829d549c12558aa5c4775f596080a9c93886 Mon Sep 17 00:00:00 2001
From: Mitchell Richters <mjr4077au@gmail.com>
Date: Fri, 25 Nov 2022 14:48:31 +1100
Subject: [PATCH] - Rename `PlayerHorizon::horiz` in preparation for
 replacement work.

---
 source/core/gameinput.cpp            | 18 ++++-----
 source/core/gameinput.h              | 22 +++++------
 source/games/blood/src/player.cpp    |  6 +--
 source/games/duke/src/actors_d.cpp   |  2 +-
 source/games/duke/src/gameexec.cpp   |  6 +--
 source/games/duke/src/input.cpp      |  2 +-
 source/games/duke/src/player.cpp     |  4 +-
 source/games/duke/src/player_r.cpp   |  8 ++--
 source/games/duke/src/prediction.cpp |  2 +-
 source/games/duke/src/premap.cpp     |  2 +-
 source/games/exhumed/src/gun.cpp     |  6 +--
 source/games/exhumed/src/player.cpp  | 18 ++++-----
 source/games/sw/src/jsector.cpp      |  2 +-
 source/games/sw/src/jweapon.cpp      |  6 +--
 source/games/sw/src/player.cpp       |  8 ++--
 source/games/sw/src/weapon.cpp       | 58 ++++++++++++++--------------
 16 files changed, 85 insertions(+), 85 deletions(-)

diff --git a/source/core/gameinput.cpp b/source/core/gameinput.cpp
index 00453c0d1..26521fb2f 100644
--- a/source/core/gameinput.cpp
+++ b/source/core/gameinput.cpp
@@ -181,33 +181,33 @@ void PlayerHorizon::applyinput(float const horz, ESyncBits* actions, double cons
 		// Process mouse input.
 		if (horz)
 		{
-			horiz += DAngle::fromDeg(horz);
+			ZzHORIZON += DAngle::fromDeg(horz);
 			*actions &= ~SB_CENTERVIEW;
 		}
 
 		// Process keyboard input.
 		if (auto aiming = !!(*actions & SB_AIM_DOWN) - !!(*actions & SB_AIM_UP))
 		{
-			horiz += getTicrateScale(PITCH_AIMSPEED) * scaleAdjust * aiming;
+			ZzHORIZON += getTicrateScale(PITCH_AIMSPEED) * scaleAdjust * aiming;
 			*actions &= ~SB_CENTERVIEW;
 		}
 		if (auto looking = !!(*actions & SB_LOOK_DOWN) - !!(*actions & SB_LOOK_UP))
 		{
-			horiz += getTicrateScale(PITCH_LOOKSPEED) * scaleAdjust * looking;
+			ZzHORIZON += getTicrateScale(PITCH_LOOKSPEED) * scaleAdjust * looking;
 			*actions |= SB_CENTERVIEW;
 		}
 
 		// Do return to centre.
 		if ((*actions & SB_CENTERVIEW) && !(*actions & (SB_LOOK_UP|SB_LOOK_DOWN)))
 		{
-			const auto pitch = abs(horiz);
+			const auto pitch = abs(ZzHORIZON);
 			const auto scale = pitch > PITCH_CNTRSINEOFFSET ? (pitch - PITCH_CNTRSINEOFFSET).Cos() : 1.;
-			scaletozero(horiz, PITCH_CENTERSPEED * scale, scaleAdjust);
-			if (!horiz.Sgn()) *actions &= ~SB_CENTERVIEW;
+			scaletozero(ZzHORIZON, PITCH_CENTERSPEED * scale, scaleAdjust);
+			if (!ZzHORIZON.Sgn()) *actions &= ~SB_CENTERVIEW;
 		}
 
 		// clamp before we finish, even if it's clamped in the drawer.
-		horiz = ClampViewPitch(horiz);
+		ZzHORIZON = ClampViewPitch(ZzHORIZON);
 	}
 	else
 	{
@@ -357,14 +357,14 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, PlayerHorizon& w,
 {
 	if (arc.BeginObject(keyname))
 	{
-		arc("horiz", w.horiz)
+		arc("horiz", w.ZzHORIZON)
 			("horizoff", w.horizoff)
 			("inputdisabled", w.inputdisabled)
 			.EndObject();
 
 		if (arc.isReading())
 		{
-			w.ohoriz = w.horiz;
+			w.ohoriz = 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 97bd9e36b..bb0bf21d1 100644
--- a/source/core/gameinput.h
+++ b/source/core/gameinput.h
@@ -8,7 +8,7 @@
 
 struct PlayerHorizon
 {
-	DAngle horiz, ohoriz, horizoff, ohorizoff;
+	DAngle ZzHORIZON, ohoriz, horizoff, ohorizoff;
 
 	friend FSerializer& Serialize(FSerializer& arc, const char* keyname, PlayerHorizon& w, PlayerHorizon* def);
 
@@ -19,18 +19,18 @@ struct PlayerHorizon
 	// Interpolation helpers.
 	void backup()
 	{
-		ohoriz = horiz;
+		ohoriz = ZzHORIZON;
 		ohorizoff = horizoff;
 	}
 	void restore()
 	{
-		horiz = ohoriz;
+		ZzHORIZON = ohoriz;
 		horizoff = ohorizoff;
 	}
 
 	// Commonly used getters.
 	DAngle osum() { return ohoriz + ohorizoff; }
-	DAngle sum() { return horiz + horizoff; }
+	DAngle sum() { return ZzHORIZON + horizoff; }
 	DAngle interpolatedsum(double const interpfrac) { return interpolatedvalue(osum(), sum(), interpfrac); }
 
 	// Ticrate playsim adjustment helpers.
@@ -51,7 +51,7 @@ struct PlayerHorizon
 		}
 		else
 		{
-			horiz += value;
+			ZzHORIZON += value;
 		}
 	}
 
@@ -66,8 +66,8 @@ struct PlayerHorizon
 		}
 		else
 		{
-			horiz = value;
-			if (backup) ohoriz = horiz;
+			ZzHORIZON = value;
+			if (backup) ohoriz = ZzHORIZON;
 		}
 	}
 
@@ -75,21 +75,21 @@ struct PlayerHorizon
 	{
 		if (targetset())
 		{
-			auto delta = deltaangle(horiz, target);
+			auto delta = deltaangle(ZzHORIZON, target);
 
 			if (abs(delta).Degrees() > 0.45)
 			{
-				horiz += delta * scaleAdjust;
+				ZzHORIZON += delta * scaleAdjust;
 			}
 			else
 			{
-				horiz = target;
+				ZzHORIZON = target;
 				target = nullAngle;
 			}
 		}
 		else if (adjustment.Sgn())
 		{
-			horiz += adjustment * scaleAdjust;
+			ZzHORIZON += adjustment * scaleAdjust;
 		}
 	}
 
diff --git a/source/games/blood/src/player.cpp b/source/games/blood/src/player.cpp
index 6e8ede67f..4b279692e 100644
--- a/source/games/blood/src/player.cpp
+++ b/source/games/blood/src/player.cpp
@@ -821,7 +821,7 @@ void playerStart(int nPlayer, int bNewLevel)
 	pPlayer->actor->xspr.health = pDudeInfo->startHealth << 4;
 	pPlayer->actor->spr.cstat &= ~CSTAT_SPRITE_INVISIBLE;
 	pPlayer->bloodlust = 0;
-	pPlayer->horizon.horiz = pPlayer->horizon.horizoff = nullAngle;
+	pPlayer->horizon.ZzHORIZON = pPlayer->horizon.horizoff = nullAngle;
 	pPlayer->slope = 0;
 	pPlayer->fragger = nullptr;
 	pPlayer->underwaterTime = 1200;
@@ -1558,7 +1558,7 @@ void ProcessInput(PLAYER* pPlayer)
 		}
 		pPlayer->deathTime += 4;
 		if (!bSeqStat)
-			pPlayer->horizon.addadjustment(deltaangle(pPlayer->horizon.horiz, gi->playerPitchMax() * (1. - BobVal(min((pPlayer->deathTime << 3) + 512, 1536))) * 0.5));
+			pPlayer->horizon.addadjustment(deltaangle(pPlayer->horizon.ZzHORIZON, gi->playerPitchMax() * (1. - BobVal(min((pPlayer->deathTime << 3) + 512, 1536))) * 0.5));
 		if (pPlayer->curWeapon)
 			pInput->setNewWeapon(pPlayer->curWeapon);
 		if (pInput->actions & SB_OPEN)
@@ -1733,7 +1733,7 @@ void ProcessInput(PLAYER* pPlayer)
 	pPlayer->angle.unlockinput();
 	pPlayer->horizon.unlockinput();
 
-	pPlayer->slope = pPlayer->horizon.horiz.Tan();
+	pPlayer->slope = pPlayer->horizon.ZzHORIZON.Tan();
 	if (pInput->actions & SB_INVPREV)
 	{
 		pInput->actions &= ~SB_INVPREV;
diff --git a/source/games/duke/src/actors_d.cpp b/source/games/duke/src/actors_d.cpp
index aa0f1ba9e..b809de479 100644
--- a/source/games/duke/src/actors_d.cpp
+++ b/source/games/duke/src/actors_d.cpp
@@ -1719,7 +1719,7 @@ static void greenslime(DDukeActor *actor)
 				return;
 			}
 
-		actor->spr.pos.Z = ps[p].GetActor()->getOffsetZ() + 8 + ps[p].pyoff - (actor->temp_data[2] + (ps[p].horizon.horiz.Tan() * 2048.)) * zinttoworld;
+		actor->spr.pos.Z = ps[p].GetActor()->getOffsetZ() + 8 + ps[p].pyoff - (actor->temp_data[2] + (ps[p].horizon.ZzHORIZON.Tan() * 2048.)) * zinttoworld;
 
 		if (actor->temp_data[2] > 512)
 			actor->temp_data[2] -= 128;
diff --git a/source/games/duke/src/gameexec.cpp b/source/games/duke/src/gameexec.cpp
index ec71f203b..c15a4e06a 100644
--- a/source/games/duke/src/gameexec.cpp
+++ b/source/games/duke/src/gameexec.cpp
@@ -346,7 +346,7 @@ void DoPlayer(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
 			}
 			ps[iPlayer].horizon.settarget(maphoriz(-lValue));
 		}
-		else SetGameVarID(lVar2, int(ps[iPlayer].horizon.horiz.Tan() * -128.), sActor, sPlayer);
+		else SetGameVarID(lVar2, int(ps[iPlayer].horizon.ZzHORIZON.Tan() * -128.), sActor, sPlayer);
 		break;
 
 	case PLAYER_OHORIZ:
@@ -925,7 +925,7 @@ void DoPlayer(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
 
 	case PLAYER_RETURN_TO_CENTER:
 		if (bSet) ps[iPlayer].sync.actions |= SB_CENTERVIEW;
-		else SetGameVarID(lVar2, ps[iPlayer].sync.actions & SB_CENTERVIEW ? int(abs((ps[iPlayer].horizon.horiz * (DAngle::fromDeg(9.) / GetMaxPitch())).Degrees())) : 0, sActor, sPlayer);
+		else SetGameVarID(lVar2, ps[iPlayer].sync.actions & SB_CENTERVIEW ? int(abs((ps[iPlayer].horizon.ZzHORIZON * (DAngle::fromDeg(9.) / GetMaxPitch())).Degrees())) : 0, sActor, sPlayer);
 		break;
 
 	default:
@@ -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.horiz = nullAngle;
+			ps[g_p].horizon.ohoriz = 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/input.cpp b/source/games/duke/src/input.cpp
index b5f71eb6f..e52c5f997 100644
--- a/source/games/duke/src/input.cpp
+++ b/source/games/duke/src/input.cpp
@@ -792,7 +792,7 @@ static void FinalizeInput(player_struct *p, InputPacket& input)
 			loc.avel = input.avel = 0;
 		}
 
-		if (p->newOwner != nullptr || (p->sync.actions & SB_CENTERVIEW && abs(p->horizon.horiz.Degrees()) > 2.2370))
+		if (p->newOwner != nullptr || (p->sync.actions & SB_CENTERVIEW && abs(p->horizon.ZzHORIZON.Degrees()) > 2.2370))
 		{
 			loc.horz = input.horz = 0;
 		}
diff --git a/source/games/duke/src/player.cpp b/source/games/duke/src/player.cpp
index b473457fb..bbd8c6383 100644
--- a/source/games/duke/src/player.cpp
+++ b/source/games/duke/src/player.cpp
@@ -378,7 +378,7 @@ void dokneeattack(int snum, const std::initializer_list<int> & respawnlist)
 	{
 		p->oknee_incs = p->knee_incs;
 		p->knee_incs++;
-		p->horizon.addadjustment(deltaangle(p->horizon.horiz, (p->GetActor()->getPosWithOffsetZ() - p->actorsqu->spr.pos).Pitch() * 1.1875));
+		p->horizon.addadjustment(deltaangle(p->horizon.ZzHORIZON, (p->GetActor()->getPosWithOffsetZ() - p->actorsqu->spr.pos).Pitch() * 1.1875));
 		p->sync.actions |= SB_CENTERVIEW;
 		if (p->knee_incs > 15)
 		{
@@ -622,7 +622,7 @@ void playerisdead(int snum, int psectlotag, double floorz, double ceilingz)
 
 	backupplayer(p);
 
-	p->horizon.horizoff = p->horizon.horiz = nullAngle;
+	p->horizon.horizoff = p->horizon.ZzHORIZON = nullAngle;
 
 	updatesector(p->GetActor()->getPosWithOffsetZ(), &p->cursector);
 
diff --git a/source/games/duke/src/player_r.cpp b/source/games/duke/src/player_r.cpp
index de02024c3..b3435ab55 100644
--- a/source/games/duke/src/player_r.cpp
+++ b/source/games/duke/src/player_r.cpp
@@ -1472,7 +1472,7 @@ void checkweapons_r(player_struct* p)
 			}
 			p->OnMotorcycle = 0;
 			p->gotweapon[MOTORCYCLE_WEAPON] = false;
-			p->horizon.horiz = nullAngle;
+			p->horizon.ZzHORIZON = nullAngle;
 			p->moto_do_bump = 0;
 			p->MotoSpeed = 0;
 			p->TiltStatus = 0;
@@ -1491,7 +1491,7 @@ void checkweapons_r(player_struct* p)
 			}
 			p->OnBoat = 0;
 			p->gotweapon[BOAT_WEAPON] = false;
-			p->horizon.horiz = nullAngle;
+			p->horizon.ZzHORIZON = nullAngle;
 			p->moto_do_bump = 0;
 			p->MotoSpeed = 0;
 			p->TiltStatus = 0;
@@ -1718,7 +1718,7 @@ static void onMotorcycle(int snum, ESyncBits &actions)
 	}
 	if (horiz != FRACUNIT)
 	{
-		p->horizon.addadjustment(deltaangle(p->horizon.horiz, maphoriz(-horiz)));
+		p->horizon.addadjustment(deltaangle(p->horizon.ZzHORIZON, maphoriz(-horiz)));
 	}
 
 	const DAngle adjust = mapangle(-510);
@@ -1986,7 +1986,7 @@ static void onBoat(int snum, ESyncBits &actions)
 	}
 	if (horiz != FRACUNIT)
 	{
-		p->horizon.addadjustment(deltaangle(p->horizon.horiz, maphoriz(-horiz)));
+		p->horizon.addadjustment(deltaangle(p->horizon.ZzHORIZON, maphoriz(-horiz)));
 	}
 
 	if (p->MotoSpeed > 0 && p->on_ground == 1 && (p->vehTurnLeft || p->vehTurnRight))
diff --git a/source/games/duke/src/prediction.cpp b/source/games/duke/src/prediction.cpp
index 2f9885627..77830e008 100644
--- a/source/games/duke/src/prediction.cpp
+++ b/source/games/duke/src/prediction.cpp
@@ -54,7 +54,7 @@ void resetmys()
 	mypos = omypos = ps[myconnectindex].GetActor()->getPosWithOffsetZ();
 	myxvel = myyvel = myzvel = 0;
 	myang = ps[myconnectindex].angle.ang;
-	myhoriz = omyhoriz = ps[myconnectindex].horizon.horiz;
+	myhoriz = omyhoriz = ps[myconnectindex].horizon.ZzHORIZON;
 	myhorizoff = omyhorizoff = ps[myconnectindex].horizon.horizoff;
 	mycursectnum = sectindex(ps[myconnectindex].cursector);
 	myjumpingcounter = ps[myconnectindex].jumping_counter;
diff --git a/source/games/duke/src/premap.cpp b/source/games/duke/src/premap.cpp
index cd0fc1502..874bc83f6 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.horiz = DAngle::fromDeg(-17.354);
+	p->horizon.ohoriz = 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/gun.cpp b/source/games/exhumed/src/gun.cpp
index 98f1d1020..a4cc9f534 100644
--- a/source/games/exhumed/src/gun.cpp
+++ b/source/games/exhumed/src/gun.cpp
@@ -729,7 +729,7 @@ loc_flag:
                 // loc_27266:
                 case kWeaponSword:
                 {
-                    nHeight += PlayerList[nLocalPlayer].horizon.horiz.Tan() * 32.;
+                    nHeight += PlayerList[nLocalPlayer].horizon.ZzHORIZON.Tan() * 32.;
 
                     thePos.Z += nHeight;
 
@@ -834,7 +834,7 @@ loc_flag:
                 }
                 case kWeaponPistol:
                 {
-                    double h = PlayerList[nLocalPlayer].horizon.horiz.Tan() * 2.;
+                    double h = PlayerList[nLocalPlayer].horizon.ZzHORIZON.Tan() * 2.;
                     nHeight += h;
 
                     DExhumedActor* target = nullptr;
@@ -858,7 +858,7 @@ loc_flag:
 
                 case kWeaponGrenade:
                 {
-                    ThrowGrenade(nPlayer, nHeight - 10, PlayerList[nLocalPlayer].horizon.horiz.Tan());
+                    ThrowGrenade(nPlayer, nHeight - 10, PlayerList[nLocalPlayer].horizon.ZzHORIZON.Tan());
                     break;
                 }
                 case kWeaponStaff:
diff --git a/source/games/exhumed/src/player.cpp b/source/games/exhumed/src/player.cpp
index 151a15a44..c60dcd582 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.horiz = nullAngle;
+	plr->nDestVertPan = plr->horizon.ohoriz = 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.horiz = nullAngle;
+    PlayerList[nPlayer].horizon.ohoriz = PlayerList[nPlayer].horizon.ZzHORIZON = nullAngle;
     pActor->oviewzoffset = pActor->viewzoffset = -55;
     PlayerList[nPlayer].nInvisible = 0;
     dVertPan[nPlayer] = 15;
@@ -1114,7 +1114,7 @@ void AIPlayer::Tick(RunListEvent* ev)
                     zVelB = -zVelB;
                 }
 
-                if (zVelB > 2 && !PlayerList[nPlayer].horizon.horiz.Sgn() && cl_slopetilting) {
+                if (zVelB > 2 && !PlayerList[nPlayer].horizon.ZzHORIZON.Sgn() && cl_slopetilting) {
                     PlayerList[nPlayer].nDestVertPan = nullAngle;
                 }
             }
@@ -2480,12 +2480,12 @@ sectdone:
 
         if (actions & (SB_AIM_UP | SB_AIM_DOWN) || sPlayerInput[nPlayer].pan)
         {
-            pPlayer->nDestVertPan = pPlayer->horizon.horiz;
+            pPlayer->nDestVertPan = pPlayer->horizon.ZzHORIZON;
             pPlayer->bPlayerPan = pPlayer->bLockPan = true;
         }
         else if (actions & (SB_LOOK_UP | SB_LOOK_DOWN | SB_CENTERVIEW))
         {
-            pPlayer->nDestVertPan = pPlayer->horizon.horiz;
+            pPlayer->nDestVertPan = pPlayer->horizon.ZzHORIZON;
             pPlayer->bPlayerPan = pPlayer->bLockPan = false;
         }
 
@@ -2496,7 +2496,7 @@ sectdone:
 
         if (cl_slopetilting && !pPlayer->bPlayerPan && !pPlayer->bLockPan)
         {
-            if (double nVertPan = deltaangle(pPlayer->horizon.horiz, pPlayer->nDestVertPan).Tan() * 32.)
+            if (double nVertPan = deltaangle(pPlayer->horizon.ZzHORIZON, pPlayer->nDestVertPan).Tan() * 32.)
             {
                 pPlayer->horizon.addadjustment(maphoriz(abs(nVertPan) >= 4 ? clamp(nVertPan, -4., 4.) : nVertPan * 2.));
             }
@@ -2616,7 +2616,7 @@ sectdone:
         }
         else
         {
-            if (PlayerList[nPlayer].horizon.horiz.Sgn() > 0)
+            if (PlayerList[nPlayer].horizon.ZzHORIZON.Sgn() > 0)
             {
                 PlayerList[nPlayer].horizon.settarget(nullAngle);
                 pPlayerActor->viewzoffset -= dVertPan[nPlayer];
@@ -2625,11 +2625,11 @@ sectdone:
             {
                 PlayerList[nPlayer].horizon.addadjustment(maphoriz(-dVertPan[nPlayer]));
 
-                if (PlayerList[nPlayer].horizon.horiz.Degrees() <= 38)
+                if (PlayerList[nPlayer].horizon.ZzHORIZON.Degrees() <= 38)
                 {
                     PlayerList[nPlayer].horizon.settarget(DAngle::fromDeg(-37.72));
                 }
-                else if (PlayerList[nPlayer].horizon.horiz.Sgn() >= 0)
+                else if (PlayerList[nPlayer].horizon.ZzHORIZON.Sgn() >= 0)
                 {
                     if (!(pPlayerActor->sector()->Flag & kSectUnderwater))
                     {
diff --git a/source/games/sw/src/jsector.cpp b/source/games/sw/src/jsector.cpp
index a5fe19583..8f71458f0 100644
--- a/source/games/sw/src/jsector.cpp
+++ b/source/games/sw/src/jsector.cpp
@@ -612,7 +612,7 @@ void JS_DrawCameras(PLAYER* pp, const DVector3& campos, double smoothratio)
 
                             if (TEST_BOOL11(camactor) && numplayers > 1)
                             {
-                                drawroomstotile(cp->actor->getPosWithOffsetZ(), cp->angle.ang, cp->horizon.horiz, cp->cursector, mirror[cnt].campic, smoothratio);
+                                drawroomstotile(cp->actor->getPosWithOffsetZ(), cp->angle.ang, cp->horizon.ZzHORIZON, cp->cursector, mirror[cnt].campic, smoothratio);
                             }
                             else
                             {
diff --git a/source/games/sw/src/jweapon.cpp b/source/games/sw/src/jweapon.cpp
index ddcf47482..87e6bfbd5 100644
--- a/source/games/sw/src/jweapon.cpp
+++ b/source/games/sw/src/jweapon.cpp
@@ -1285,7 +1285,7 @@ int PlayerInitChemBomb(PLAYER* pp)
     if (pp->Flags & (PF_DIVING) || SpriteInUnderwaterArea(actorNew))
         actorNew->user.Flags |= (SPR_UNDERWATER);
 
-    setFreeAimVelocity(actorNew->vel.X, actorNew->vel.Z, pp->horizon.horiz, HORIZ_MULTF);
+    setFreeAimVelocity(actorNew->vel.X, actorNew->vel.Z, pp->horizon.ZzHORIZON, HORIZ_MULTF);
 
     double oclipdist = plActor->clipdist;
     plActor->clipdist = 0;
@@ -1655,7 +1655,7 @@ int PlayerInitCaltrops(PLAYER* pp)
     if (pp->Flags & (PF_DIVING) || SpriteInUnderwaterArea(actorNew))
         actorNew->user.Flags |= (SPR_UNDERWATER);
 
-    setFreeAimVelocity(actorNew->vel.X, actorNew->vel.Z, pp->horizon.horiz, HORIZ_MULTF);
+    setFreeAimVelocity(actorNew->vel.X, actorNew->vel.Z, pp->horizon.ZzHORIZON, HORIZ_MULTF);
 
     double oclipdist = plActor->clipdist;
     plActor->clipdist = 0;
@@ -2198,7 +2198,7 @@ int SpawnShell(DSWActor* actor, int ShellNum)
 
     if (actor->user.PlayerP)
     {
-        setFreeAimVelocity(actorNew->vel.X, actorNew->vel.Z, actor->user.PlayerP->horizon.horiz, HORIZ_MULTF * (1. / 3.));
+        setFreeAimVelocity(actorNew->vel.X, actorNew->vel.Z, actor->user.PlayerP->horizon.ZzHORIZON, HORIZ_MULTF * (1. / 3.));
     }
 
     switch (actorNew->user.ID)
diff --git a/source/games/sw/src/player.cpp b/source/games/sw/src/player.cpp
index f110978d1..e96caa958 100644
--- a/source/games/sw/src/player.cpp
+++ b/source/games/sw/src/player.cpp
@@ -5876,7 +5876,7 @@ void DoPlayerBeginDie(PLAYER* pp)
 
 static inline void DoPlayerDeathHoriz(PLAYER* pp, const DAngle target, const double speed)
 {
-    auto targetdelta = deltaangle(pp->horizon.horiz, target);
+    auto targetdelta = deltaangle(pp->horizon.ZzHORIZON, target);
 
     if (abs(targetdelta.Degrees()) > 1)
     {
@@ -6023,7 +6023,7 @@ void DoPlayerDeathCheckKeys(PLAYER* pp)
         pp->input.actions |= SB_CENTERVIEW;
 		plActor->spr.scale = DVector2(PLAYER_NINJA_XREPEAT, PLAYER_NINJA_YREPEAT);
 
-        pp->horizon.horiz = nullAngle;
+        pp->horizon.ZzHORIZON = nullAngle;
         plActor->user.ID = NINJA_RUN_R0;
         PlayerDeathReset(pp);
 
@@ -7042,13 +7042,13 @@ void InitAllPlayers(void)
     extern bool NewGame;
     //int fz,cz;
 
-    pfirst->horizon.horiz = nullAngle;
+    pfirst->horizon.ZzHORIZON = nullAngle;
 
     // Initialize all [MAX_SW_PLAYERS] arrays here!
     for (pp = Player; pp < &Player[MAX_SW_PLAYERS]; pp++)
     {
         pp->angle.ang = pp->angle.oang = pfirst->angle.ang;
-        pp->horizon.horiz = pp->horizon.ohoriz = pfirst->horizon.horiz;
+        pp->horizon.ZzHORIZON = pp->horizon.ohoriz = 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;
diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp
index ceff9d82f..e22e5ed77 100644
--- a/source/games/sw/src/weapon.cpp
+++ b/source/games/sw/src/weapon.cpp
@@ -11534,7 +11534,7 @@ int DoRing(DSWActor* actor)
 
     // put it out there
     actor->spr.pos += actor->spr.Angles.Yaw.ToVector() * actor->user.Dist;
-    if (pp) actor->spr.pos.Z -= actor->user.Dist * pp->horizon.horiz.Tan() * 2.; // horizon math sucks...
+    if (pp) actor->spr.pos.Z -= actor->user.Dist * pp->horizon.ZzHORIZON.Tan() * 2.; // horizon math sucks...
 
     SetActor(actor, actor->spr.pos);
 
@@ -11612,7 +11612,7 @@ void InitSpellRing(PLAYER* pp)
 
         // put it out there
         actorNew->spr.pos += actorNew->spr.Angles.Yaw.ToVector() * actorNew->user.Dist;
-        actorNew->spr.pos.Z += pp->actor->getOffsetZ() + 20 - (actorNew->user.Dist * pp->horizon.horiz.Tan() * 2.); // horizon math sucks...
+        actorNew->spr.pos.Z += pp->actor->getOffsetZ() + 20 - (actorNew->user.Dist * pp->horizon.ZzHORIZON.Tan() * 2.); // horizon math sucks...
 
         actorNew->spr.Angles.Yaw += DAngle90;
 
@@ -11984,7 +11984,7 @@ void InitSpellNapalm(PLAYER* pp)
         actor->spr.shade = -40;
         actor->spr.scale = DVector2(0.5, 0.5);
         actor->clipdist = 0;
-        setFreeAimVelocity(actor->vel.X, actor->vel.Z, pp->horizon.horiz, HORIZ_MULTF);
+        setFreeAimVelocity(actor->vel.X, actor->vel.Z, pp->horizon.ZzHORIZON, HORIZ_MULTF);
         actor->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER);
         actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
         actor->user.Flags2 |= (SPR2_BLUR_TAPER_FAST);
@@ -12114,7 +12114,7 @@ int InitSpellMirv(PLAYER* pp)
     actorNew->spr.shade = -40;
     actorNew->spr.scale = DVector2(1.125, 1.125);
     actorNew->clipdist = 2;
-    setFreeAimVelocity(actorNew->vel.X, actorNew->vel.Z, pp->horizon.horiz, HORIZ_MULTF);
+    setFreeAimVelocity(actorNew->vel.X, actorNew->vel.Z, pp->horizon.ZzHORIZON, HORIZ_MULTF);
     actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER);
     actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
 
@@ -12249,7 +12249,7 @@ int InitSwordAttack(PLAYER* pp)
 
         double dax = 1024., daz = 0;
         DAngle daang = pp->angle.ang;
-        setFreeAimVelocity(dax, daz, pp->horizon.horiz, 1000. - (RandomRangeF(24000 / 256.) - 12000 / 256.));
+        setFreeAimVelocity(dax, daz, pp->horizon.ZzHORIZON, 1000. - (RandomRangeF(24000 / 256.) - 12000 / 256.));
         FAFhitscan(pp->actor->getPosWithOffsetZ(), pp->cursector, DVector3(pp->angle.ang.ToVector() * dax, daz), hit, CLIPMASK_MISSILE);
 
         if (hit.hitSector == nullptr)
@@ -12427,7 +12427,7 @@ int InitFistAttack(PLAYER* pp)
         HitInfo hit{};
         double dax = 1024., daz = 0;
         auto daang = pp->angle.ang;
-        setFreeAimVelocity(dax, daz, pp->horizon.horiz, 1000. - (RandomRangeF(24000 / 256.) - 12000 / 256.));
+        setFreeAimVelocity(dax, daz, pp->horizon.ZzHORIZON, 1000. - (RandomRangeF(24000 / 256.) - 12000 / 256.));
         FAFhitscan(pp->actor->getPosWithOffsetZ(), pp->cursector, DVector3(pp->angle.ang.ToVector() * dax, daz), hit, CLIPMASK_MISSILE);
 
         if (hit.hitSector == nullptr)
@@ -12988,7 +12988,7 @@ int InitStar(PLAYER* pp)
     actorNew->clipdist = 2;
     // zvel was overflowing with this calculation - had to move to a local long var
     double zvel = 0;
-    setFreeAimVelocity(actorNew->vel.X, zvel, pp->horizon.horiz, (HORIZ_MULT + STAR_HORIZ_ADJ) * 0.5);
+    setFreeAimVelocity(actorNew->vel.X, zvel, pp->horizon.ZzHORIZON, (HORIZ_MULT + STAR_HORIZ_ADJ) * 0.5);
 
     actorNew->user.ceiling_dist = (1);
     actorNew->user.floor_dist = (1);
@@ -13088,7 +13088,7 @@ void InitHeartAttack(PLAYER* pp)
     actorNew->spr.shade = -10;
     actorNew->spr.scale = DVector2(0.8125, 0.8125);
     actorNew->clipdist = 0;
-    setFreeAimVelocity(actorNew->vel.X, actorNew->vel.Z, pp->horizon.horiz, HORIZ_MULTF);
+    setFreeAimVelocity(actorNew->vel.X, actorNew->vel.Z, pp->horizon.ZzHORIZON, HORIZ_MULTF);
     actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
     actorNew->user.Flags2 |= (SPR2_DONT_TARGET_OWNER);
     actorNew->spr.cstat |= (CSTAT_SPRITE_INVISIBLE);
@@ -13230,7 +13230,7 @@ int InitShotgun(PLAYER* pp)
     DAngle daang = DAngle22_5 * 0.5;
     if (WeaponAutoAimHitscan(pp->actor, &daz, &daang, false) == nullptr)
     {
-        setFreeAimVelocity(dax, daz, pp->horizon.horiz, 1000.);
+        setFreeAimVelocity(dax, daz, pp->horizon.ZzHORIZON, 1000.);
         daang = pp->angle.ang;
     }
 
@@ -13392,7 +13392,7 @@ int InitLaser(PLAYER* pp)
     actorNew->clipdist = 4;
 
     // the slower the missile travels the less of a zvel it needs
-    setFreeAimVelocity(actorNew->vel.X, actorNew->vel.Z, pp->horizon.horiz, 16.);
+    setFreeAimVelocity(actorNew->vel.X, actorNew->vel.Z, pp->horizon.ZzHORIZON, 16.);
 
     actorNew->user.WeaponNum = actor->user.WeaponNum;
     actorNew->user.Radius = 200;
@@ -13487,7 +13487,7 @@ int InitRail(PLAYER* pp)
     SetOwner(pp->actor, actorNew);
     actorNew->spr.scale = DVector2(0.8125, 0.8125);
     actorNew->spr.shade = -15;
-    setFreeAimVelocity(actorNew->vel.X, zvel, pp->horizon.horiz, (HORIZ_MULT + 17) * 0.5);
+    setFreeAimVelocity(actorNew->vel.X, zvel, pp->horizon.ZzHORIZON, (HORIZ_MULT + 17) * 0.5);
 
     actorNew->user.RotNum = 5;
     NewStateGroup(actorNew, &sg_Rail[0]);
@@ -13651,7 +13651,7 @@ int InitRocket(PLAYER* pp)
     SetOwner(pp->actor, actorNew);
     actorNew->spr.scale = DVector2(1.40626, 1.40625);
     actorNew->spr.shade = -15;
-    setFreeAimVelocity(actorNew->vel.X, zvel, pp->horizon.horiz, (HORIZ_MULT + 35) * 0.5);
+    setFreeAimVelocity(actorNew->vel.X, zvel, pp->horizon.ZzHORIZON, (HORIZ_MULT + 35) * 0.5);
 
     actorNew->clipdist = 4;
 
@@ -13758,7 +13758,7 @@ int InitBunnyRocket(PLAYER* pp)
     SetOwner(pp->actor, actorNew);
     actorNew->spr.scale = DVector2(1, 1);
     actorNew->spr.shade = -15;
-    setFreeAimVelocity(actorNew->vel.X, zvel, pp->horizon.horiz, (HORIZ_MULT + 35) * 0.5);
+    setFreeAimVelocity(actorNew->vel.X, zvel, pp->horizon.ZzHORIZON, (HORIZ_MULT + 35) * 0.5);
 
     actorNew->clipdist = 4;
 
@@ -13860,7 +13860,7 @@ int InitNuke(PLAYER* pp)
     SetOwner(pp->actor, actorNew);
     actorNew->spr.scale = DVector2(2, 2);
     actorNew->spr.shade = -15;
-    setFreeAimVelocity(actorNew->vel.X, zvel, pp->horizon.horiz, (HORIZ_MULT + 36) * 0.5);
+    setFreeAimVelocity(actorNew->vel.X, zvel, pp->horizon.ZzHORIZON, (HORIZ_MULT + 36) * 0.5);
     actorNew->clipdist = 4;
 
     // Set to red palette
@@ -14016,7 +14016,7 @@ int InitMicro(PLAYER* pp)
         return 0;
 
     double vel = 75., zvel = 0;
-    setFreeAimVelocity(vel, zvel, pp->horizon.horiz, HORIZ_MULTF);
+    setFreeAimVelocity(vel, zvel, pp->horizon.ZzHORIZON, HORIZ_MULTF);
 
     for (i = 0; i < MAX_MICRO; i++)
     {
@@ -15221,7 +15221,7 @@ int InitTracerUzi(PLAYER* pp)
 
     static const short lat_dist[] = {800,-800};
 
-    double nz = 8 + (pp->horizon.horiz.Tan() * 36.);
+    double nz = 8 + (pp->horizon.ZzHORIZON.Tan() * 36.);
 
     // Spawn a shot
     // Inserting and setting up variables
@@ -15260,7 +15260,7 @@ int InitTracerUzi(PLAYER* pp)
         return 0;
     }
 
-    setFreeAimVelocity(actorNew->vel.X, actorNew->vel.Z, pp->horizon.horiz, actorNew->vel.X);
+    setFreeAimVelocity(actorNew->vel.X, actorNew->vel.Z, pp->horizon.ZzHORIZON, actorNew->vel.X);
 
     plActor->clipdist = oclipdist;
 
@@ -15525,7 +15525,7 @@ int InitUzi(PLAYER* pp)
     else
     {
         daang = pp->angle.ang + mapangle(RandomRange(24) - 12);
-        setFreeAimVelocity(dax, daz, pp->horizon.horiz, 1000. - (RandomRangeF(24000/256.) - 12000/256.));
+        setFreeAimVelocity(dax, daz, pp->horizon.ZzHORIZON, 1000. - (RandomRangeF(24000/256.) - 12000/256.));
     }
 
     DVector3 vect(daang.ToVector() * dax, daz);
@@ -15697,7 +15697,7 @@ int InitTankShell(DSWActor* actor, PLAYER* pp)
     actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
     actorNew->spr.cstat |= (CSTAT_SPRITE_INVISIBLE);
 
-    setFreeAimVelocity(actorNew->vel.X, actorNew->vel.Z, pp->horizon.horiz, actorNew->vel.X);
+    setFreeAimVelocity(actorNew->vel.X, actorNew->vel.Z, pp->horizon.ZzHORIZON, actorNew->vel.X);
 
     WeaponAutoAim(actor, actorNew, DAngle22_5 / 2, false);
     // a bit of randomness
@@ -15765,7 +15765,7 @@ int InitTurretMicro(DSWActor* actor, PLAYER* pp)
         SetOwner(plActor, actorNew);
         actorNew->spr.scale = DVector2(0.375, 0.375);
         actorNew->spr.shade = -15;
-        setFreeAimVelocity(actorNew->vel.X, actorNew->vel.Z, pp->horizon.horiz, HORIZ_MULTF - RandomRangeF(8) + 5);
+        setFreeAimVelocity(actorNew->vel.X, actorNew->vel.Z, pp->horizon.ZzHORIZON, HORIZ_MULTF - RandomRangeF(8) + 5);
         actorNew->clipdist = 4;
 
 
@@ -15834,7 +15834,7 @@ int InitTurretRocket(DSWActor* actor, PLAYER* pp)
     actorNew->user.Flags2 |= (SPR2_SO_MISSILE);
     actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
 
-    setFreeAimVelocity(actorNew->vel.X, actorNew->vel.Z, pp->horizon.horiz, actorNew->vel.X);
+    setFreeAimVelocity(actorNew->vel.X, actorNew->vel.Z, pp->horizon.ZzHORIZON, actorNew->vel.X);
 
     WeaponAutoAim(actor, actorNew, DAngle22_5 / 2, false);
     // a bit of randomness
@@ -15873,7 +15873,7 @@ int InitTurretFireball(DSWActor* actor, PLAYER* pp)
     actorNew->user.Flags2 |= (SPR2_SO_MISSILE);
     actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
 
-    setFreeAimVelocity(actorNew->vel.X, actorNew->vel.Z, pp->horizon.horiz, actorNew->vel.X);
+    setFreeAimVelocity(actorNew->vel.X, actorNew->vel.Z, pp->horizon.ZzHORIZON, actorNew->vel.X);
 
     WeaponAutoAim(actor, actorNew, DAngle22_5 / 2, false);
     // a bit of randomness
@@ -15910,7 +15910,7 @@ int InitTurretRail(DSWActor* actor, PLAYER* pp)
     SetOwner(pp->actor, actorNew);
     actorNew->spr.scale = DVector2(0.8125, 0.8125);
     actorNew->spr.shade = -15;
-    setFreeAimVelocity(actorNew->vel.X, actorNew->vel.Z, pp->horizon.horiz, HORIZ_MULTF);
+    setFreeAimVelocity(actorNew->vel.X, actorNew->vel.Z, pp->horizon.ZzHORIZON, HORIZ_MULTF);
 
     actorNew->user.RotNum = 5;
     NewStateGroup(actorNew, &sg_Rail[0]);
@@ -15957,7 +15957,7 @@ int InitTurretLaser(DSWActor* actor, PLAYER* pp)
     actorNew->spr.shade = -15;
 
     // the slower the missile travels the less of a zvel it needs
-    setFreeAimVelocity(actorNew->vel.X, actorNew->vel.Z, pp->horizon.horiz, 16.);
+    setFreeAimVelocity(actorNew->vel.X, actorNew->vel.Z, pp->horizon.ZzHORIZON, 16.);
 
     actorNew->user.Radius = 200;
     actorNew->user.ceiling_dist = (1);
@@ -15996,7 +15996,7 @@ int InitSobjMachineGun(DSWActor* actor, PLAYER* pp)
     double daz = npos.Z;
 
     if (RANDOM_P2(1024) < 200)
-        InitTracerTurret(actor, pp->actor, pp->horizon.horiz);
+        InitTracerTurret(actor, pp->actor, pp->horizon.ZzHORIZON);
 
     DAngle daang = DAngle22_5 / 2;
     if (WeaponAutoAimHitscan(actor, &daz, &daang, false) != nullptr)
@@ -16005,7 +16005,7 @@ int InitSobjMachineGun(DSWActor* actor, PLAYER* pp)
     }
     else
     {
-        setFreeAimVelocity(dax, daz, DAngle::fromDeg(min(pp->horizon.horiz.Degrees(), 11.0515)), 1000 - RandomRangeF(80) + 40);
+        setFreeAimVelocity(dax, daz, DAngle::fromDeg(min(pp->horizon.ZzHORIZON.Degrees(), 11.0515)), 1000 - RandomRangeF(80) + 40);
         daang = actor->spr.Angles.Yaw;
     }
 
@@ -16695,7 +16695,7 @@ int InitGrenade(PLAYER* pp)
     if (pp->Flags & (PF_DIVING) || SpriteInUnderwaterArea(actorNew))
         actorNew->user.Flags |= (SPR_UNDERWATER);
 
-    setFreeAimVelocity(actorNew->vel.X, actorNew->vel.Z, pp->horizon.horiz, HORIZ_MULTF);
+    setFreeAimVelocity(actorNew->vel.X, actorNew->vel.Z, pp->horizon.ZzHORIZON, HORIZ_MULTF);
 
     auto oclipdist = actor->clipdist;
     actor->clipdist = 0;
@@ -16811,7 +16811,7 @@ int InitMine(PLAYER* pp)
     actorNew->spr.scale = DVector2(0.5, 0.5);
     actorNew->spr.shade = -15;
     actorNew->clipdist = 8;
-    setFreeAimVelocity(actorNew->vel.X, actorNew->vel.Z, pp->horizon.horiz, HORIZ_MULTF);
+    setFreeAimVelocity(actorNew->vel.X, actorNew->vel.Z, pp->horizon.ZzHORIZON, HORIZ_MULTF);
     actorNew->user.WeaponNum = actor->user.WeaponNum;
     actorNew->user.Radius = 200;
     actorNew->user.ceiling_dist = (5);
@@ -16946,7 +16946,7 @@ int InitFireball(PLAYER* pp)
     actorNew->user.ceiling_dist = (6);
     actorNew->user.floor_dist = (6);
     double zvel = 0.;
-    setFreeAimVelocity(actorNew->vel.X, zvel, pp->horizon.horiz, 120.);
+    setFreeAimVelocity(actorNew->vel.X, zvel, pp->horizon.ZzHORIZON, 120.);
 
     // at certain angles the clipping box was big enough to block the
     // initial positioning of the fireball.