mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-31 12:30:40 +00:00
- Rename PlayerHorizon::ohoriz
in preparation for replacement work.
This commit is contained in:
parent
401a829d54
commit
0c53990c87
6 changed files with 12 additions and 12 deletions
|
@ -364,7 +364,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, PlayerHorizon& w,
|
||||||
|
|
||||||
if (arc.isReading())
|
if (arc.isReading())
|
||||||
{
|
{
|
||||||
w.ohoriz = w.ZzHORIZON;
|
w.ZzOLDHORIZON = w.ZzHORIZON;
|
||||||
w.ohorizoff = w.horizoff;
|
w.ohorizoff = w.horizoff;
|
||||||
w.inputdisabled = w.inputdisabled;
|
w.inputdisabled = w.inputdisabled;
|
||||||
w.resetadjustment();
|
w.resetadjustment();
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
struct PlayerHorizon
|
struct PlayerHorizon
|
||||||
{
|
{
|
||||||
DAngle ZzHORIZON, ohoriz, horizoff, ohorizoff;
|
DAngle ZzHORIZON, ZzOLDHORIZON, horizoff, ohorizoff;
|
||||||
|
|
||||||
friend FSerializer& Serialize(FSerializer& arc, const char* keyname, PlayerHorizon& w, PlayerHorizon* def);
|
friend FSerializer& Serialize(FSerializer& arc, const char* keyname, PlayerHorizon& w, PlayerHorizon* def);
|
||||||
|
|
||||||
|
@ -19,17 +19,17 @@ struct PlayerHorizon
|
||||||
// Interpolation helpers.
|
// Interpolation helpers.
|
||||||
void backup()
|
void backup()
|
||||||
{
|
{
|
||||||
ohoriz = ZzHORIZON;
|
ZzOLDHORIZON = ZzHORIZON;
|
||||||
ohorizoff = horizoff;
|
ohorizoff = horizoff;
|
||||||
}
|
}
|
||||||
void restore()
|
void restore()
|
||||||
{
|
{
|
||||||
ZzHORIZON = ohoriz;
|
ZzHORIZON = ZzOLDHORIZON;
|
||||||
horizoff = ohorizoff;
|
horizoff = ohorizoff;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Commonly used getters.
|
// Commonly used getters.
|
||||||
DAngle osum() { return ohoriz + ohorizoff; }
|
DAngle osum() { return ZzOLDHORIZON + ohorizoff; }
|
||||||
DAngle sum() { return ZzHORIZON + horizoff; }
|
DAngle sum() { return ZzHORIZON + horizoff; }
|
||||||
DAngle interpolatedsum(double const interpfrac) { return interpolatedvalue(osum(), sum(), interpfrac); }
|
DAngle interpolatedsum(double const interpfrac) { return interpolatedvalue(osum(), sum(), interpfrac); }
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ struct PlayerHorizon
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ZzHORIZON = value;
|
ZzHORIZON = value;
|
||||||
if (backup) ohoriz = ZzHORIZON;
|
if (backup) ZzOLDHORIZON = ZzHORIZON;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -350,7 +350,7 @@ void DoPlayer(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PLAYER_OHORIZ:
|
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;
|
break;
|
||||||
|
|
||||||
case PLAYER_HORIZOFF:
|
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].last_extra = g_ac->spr.extra = gs.max_player_health;
|
||||||
ps[g_p].wantweaponfire = -1;
|
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].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.horizoff = nullAngle;
|
ps[g_p].horizon.ohorizoff = ps[g_p].horizon.horizoff = nullAngle;
|
||||||
|
|
|
@ -125,7 +125,7 @@ void resetplayerstats(int snum)
|
||||||
p->footprintpal = 0;
|
p->footprintpal = 0;
|
||||||
p->footprintshade = 0;
|
p->footprintshade = 0;
|
||||||
p->jumping_toggle = 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->horizon.ohorizoff = p->horizon.horizoff = nullAngle;
|
||||||
p->bobcounter = 0;
|
p->bobcounter = 0;
|
||||||
p->on_ground = 0;
|
p->on_ground = 0;
|
||||||
|
|
|
@ -407,7 +407,7 @@ void RestartPlayer(int nPlayer)
|
||||||
|
|
||||||
plr->nThrust.Zero();
|
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->nBreathTimer = 90;
|
||||||
|
|
||||||
plr->nTauntTimer = RandomSize(3) + 3;
|
plr->nTauntTimer = RandomSize(3) + 3;
|
||||||
|
@ -503,7 +503,7 @@ void StartDeathSeq(int nPlayer, int nVal)
|
||||||
|
|
||||||
StopFiringWeapon(nPlayer);
|
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;
|
pActor->oviewzoffset = pActor->viewzoffset = -55;
|
||||||
PlayerList[nPlayer].nInvisible = 0;
|
PlayerList[nPlayer].nInvisible = 0;
|
||||||
dVertPan[nPlayer] = 15;
|
dVertPan[nPlayer] = 15;
|
||||||
|
|
|
@ -7048,7 +7048,7 @@ void InitAllPlayers(void)
|
||||||
for (pp = Player; pp < &Player[MAX_SW_PLAYERS]; pp++)
|
for (pp = Player; pp < &Player[MAX_SW_PLAYERS]; pp++)
|
||||||
{
|
{
|
||||||
pp->angle.ang = pp->angle.oang = pfirst->angle.ang;
|
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;
|
pp->cursector = pfirst->cursector;
|
||||||
// set like this so that player can trigger something on start of the level
|
// set like this so that player can trigger something on start of the level
|
||||||
pp->lastcursector = pfirst->cursector+1;
|
pp->lastcursector = pfirst->cursector+1;
|
||||||
|
|
Loading…
Reference in a new issue