- Rename PlayerHorizon::ohorizoff in preparation for replacement work.

This commit is contained in:
Mitchell Richters 2022-11-25 14:55:05 +11:00 committed by Christoph Oelckers
parent 216fad7e18
commit 723631cc81
4 changed files with 8 additions and 8 deletions

View file

@ -365,7 +365,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, PlayerHorizon& w,
if (arc.isReading()) if (arc.isReading())
{ {
w.ZzOLDHORIZON = w.ZzHORIZON; w.ZzOLDHORIZON = w.ZzHORIZON;
w.ohorizoff = w.ZzHORIZOFF; w.ZzOHORIZOFF = w.ZzHORIZOFF;
w.inputdisabled = w.inputdisabled; w.inputdisabled = w.inputdisabled;
w.resetadjustment(); w.resetadjustment();
} }

View file

@ -8,7 +8,7 @@
struct PlayerHorizon struct PlayerHorizon
{ {
DAngle ZzHORIZON, ZzOLDHORIZON, ZzHORIZOFF, ohorizoff; DAngle ZzHORIZON, ZzOLDHORIZON, ZzHORIZOFF, ZzOHORIZOFF;
friend FSerializer& Serialize(FSerializer& arc, const char* keyname, PlayerHorizon& w, PlayerHorizon* def); friend FSerializer& Serialize(FSerializer& arc, const char* keyname, PlayerHorizon& w, PlayerHorizon* def);
@ -20,16 +20,16 @@ struct PlayerHorizon
void backup() void backup()
{ {
ZzOLDHORIZON = ZzHORIZON; ZzOLDHORIZON = ZzHORIZON;
ohorizoff = ZzHORIZOFF; ZzOHORIZOFF = ZzHORIZOFF;
} }
void restore() void restore()
{ {
ZzHORIZON = ZzOLDHORIZON; ZzHORIZON = ZzOLDHORIZON;
ZzHORIZOFF = ohorizoff; ZzHORIZOFF = ZzOHORIZOFF;
} }
// Commonly used getters. // Commonly used getters.
DAngle osum() { return ZzOLDHORIZON + ohorizoff; } DAngle osum() { return ZzOLDHORIZON + ZzOHORIZOFF; }
DAngle sum() { return ZzHORIZON + ZzHORIZOFF; } DAngle sum() { return ZzHORIZON + ZzHORIZOFF; }
DAngle interpolatedsum(double const interpfrac) { return interpolatedvalue(osum(), sum(), interpfrac); } DAngle interpolatedsum(double const interpfrac) { return interpolatedvalue(osum(), sum(), interpfrac); }

View file

@ -359,7 +359,7 @@ void DoPlayer(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
break; break;
case PLAYER_OHORIZOFF: 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; break;
case PLAYER_INVDISPTIME: 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].horizon.ZzOLDHORIZON = ps[g_p].horizon.ZzHORIZON = nullAngle;
ps[g_p].on_crane = nullptr; ps[g_p].on_crane = nullptr;
ps[g_p].frag_ps = g_p; 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].opyoff = 0;
ps[g_p].wackedbyactor = nullptr; ps[g_p].wackedbyactor = nullptr;
ps[g_p].shield_amount = gs.max_armour_amount; ps[g_p].shield_amount = gs.max_armour_amount;

View file

@ -126,7 +126,7 @@ void resetplayerstats(int snum)
p->footprintshade = 0; p->footprintshade = 0;
p->jumping_toggle = 0; p->jumping_toggle = 0;
p->horizon.ZzOLDHORIZON = p->horizon.ZzHORIZON = DAngle::fromDeg(-17.354); 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->bobcounter = 0;
p->on_ground = 0; p->on_ground = 0;
p->player_par = 0; p->player_par = 0;