mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-20 08:00:56 +00:00
- Replace all q16horiz(0)
calls.
This commit is contained in:
parent
22a9f89b64
commit
8697e5f054
11 changed files with 24 additions and 24 deletions
|
@ -61,7 +61,7 @@ inline static void scaletozero(fixedhoriz& object, const double value, const dou
|
|||
if (auto sgn = object.Sgn())
|
||||
{
|
||||
object -= getscaledhoriz(value, scaleAdjust, object, push == DBL_MAX ? sgn * (1. / 576.) : push);
|
||||
if (sgn != object.Sgn()) object = q16horiz(0);
|
||||
if (sgn != object.Sgn()) object = pitchhoriz(nullAngle.Degrees());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ struct PlayerHorizon
|
|||
else
|
||||
{
|
||||
horiz = target;
|
||||
target = q16horiz(0);
|
||||
target = pitchhoriz(nullAngle.Degrees());
|
||||
}
|
||||
}
|
||||
else if (adjustment)
|
||||
|
|
|
@ -819,7 +819,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 = q16horiz(0);
|
||||
pPlayer->horizon.horiz = pPlayer->horizon.horizoff = pitchhoriz(nullAngle.Degrees());
|
||||
pPlayer->slope = 0;
|
||||
pPlayer->fragger = nullptr;
|
||||
pPlayer->underwaterTime = 1200;
|
||||
|
|
|
@ -246,9 +246,9 @@ static void fakeProcessInput(PLAYER* pPlayer, InputPacket* pInput)
|
|||
}
|
||||
else
|
||||
{
|
||||
predict.horizoff = interpolatedvalue(predict.horizoff, q16horiz(0), 0x4000);
|
||||
predict.horizoff = interpolatedvalue(predict.horizoff, pitchhoriz(nullAngle.Degrees()), 0x4000);
|
||||
if (abs(predict.horizoff.Degrees()) < 1.79)
|
||||
predict.horizoff = q16horiz(0);
|
||||
predict.horizoff = pitchhoriz(nullAngle.Degrees());
|
||||
}
|
||||
predict.slope = -predict.horiz.Tan() * 16384.;
|
||||
#endif
|
||||
|
|
|
@ -2243,10 +2243,10 @@ 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 = q16horiz(0);
|
||||
ps[g_p].horizon.ohoriz = ps[g_p].horizon.horiz = pitchhoriz(nullAngle.Degrees());
|
||||
ps[g_p].on_crane = nullptr;
|
||||
ps[g_p].frag_ps = g_p;
|
||||
ps[g_p].horizon.ohorizoff = ps[g_p].horizon.horizoff = q16horiz(0);
|
||||
ps[g_p].horizon.ohorizoff = ps[g_p].horizon.horizoff = pitchhoriz(nullAngle.Degrees());
|
||||
ps[g_p].opyoff = 0;
|
||||
ps[g_p].wackedbyactor = nullptr;
|
||||
ps[g_p].shield_amount = gs.max_armour_amount;
|
||||
|
|
|
@ -619,7 +619,7 @@ void playerisdead(int snum, int psectlotag, double floorz, double ceilingz)
|
|||
|
||||
backupplayer(p);
|
||||
|
||||
p->horizon.horizoff = p->horizon.horiz = q16horiz(0);
|
||||
p->horizon.horizoff = p->horizon.horiz = pitchhoriz(nullAngle.Degrees());
|
||||
|
||||
updatesector(p->pos, &p->cursector);
|
||||
|
||||
|
|
|
@ -1515,7 +1515,7 @@ void checkweapons_r(player_struct* p)
|
|||
}
|
||||
p->OnMotorcycle = 0;
|
||||
p->gotweapon[MOTORCYCLE_WEAPON] = false;
|
||||
p->horizon.horiz = q16horiz(0);
|
||||
p->horizon.horiz = pitchhoriz(nullAngle.Degrees());
|
||||
p->moto_do_bump = 0;
|
||||
p->MotoSpeed = 0;
|
||||
p->TiltStatus = 0;
|
||||
|
@ -1534,7 +1534,7 @@ void checkweapons_r(player_struct* p)
|
|||
}
|
||||
p->OnBoat = 0;
|
||||
p->gotweapon[BOAT_WEAPON] = false;
|
||||
p->horizon.horiz = q16horiz(0);
|
||||
p->horizon.horiz = pitchhoriz(nullAngle.Degrees());
|
||||
p->moto_do_bump = 0;
|
||||
p->MotoSpeed = 0;
|
||||
p->TiltStatus = 0;
|
||||
|
@ -4044,7 +4044,7 @@ void OnMotorcycle(player_struct *p, DDukeActor* motosprite)
|
|||
p->gotweapon[MOTORCYCLE_WEAPON] = true;
|
||||
p->vel.X = 0;
|
||||
p->vel.Y = 0;
|
||||
p->horizon.horiz = q16horiz(0);
|
||||
p->horizon.horiz = pitchhoriz(nullAngle.Degrees());
|
||||
}
|
||||
if (!S_CheckActorSoundPlaying(p->GetActor(),186))
|
||||
S_PlayActorSound(186, p->GetActor());
|
||||
|
@ -4075,7 +4075,7 @@ void OffMotorcycle(player_struct *p)
|
|||
p->gotweapon[MOTORCYCLE_WEAPON] = false;
|
||||
p->curr_weapon = p->last_full_weapon;
|
||||
checkavailweapon(p);
|
||||
p->horizon.horiz = q16horiz(0);
|
||||
p->horizon.horiz = pitchhoriz(nullAngle.Degrees());
|
||||
p->moto_do_bump = 0;
|
||||
p->MotoSpeed = 0;
|
||||
p->TiltStatus = 0;
|
||||
|
@ -4119,7 +4119,7 @@ void OnBoat(player_struct *p, DDukeActor* boat)
|
|||
p->gotweapon[BOAT_WEAPON] = true;
|
||||
p->vel.X = 0;
|
||||
p->vel.Y = 0;
|
||||
p->horizon.horiz = q16horiz(0);
|
||||
p->horizon.horiz = pitchhoriz(nullAngle.Degrees());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4137,7 +4137,7 @@ void OffBoat(player_struct *p)
|
|||
p->gotweapon[BOAT_WEAPON] = false;
|
||||
p->curr_weapon = p->last_full_weapon;
|
||||
checkavailweapon(p);
|
||||
p->horizon.horiz = q16horiz(0);
|
||||
p->horizon.horiz = pitchhoriz(nullAngle.Degrees());
|
||||
p->moto_do_bump = 0;
|
||||
p->MotoSpeed = 0;
|
||||
p->TiltStatus = 0;
|
||||
|
|
|
@ -152,7 +152,7 @@ void resetplayerstats(int snum)
|
|||
p->footprintshade = 0;
|
||||
p->jumping_toggle = 0;
|
||||
p->horizon.ohoriz = p->horizon.horiz = q16horiz(40);
|
||||
p->horizon.ohorizoff = p->horizon.horizoff = q16horiz(0);
|
||||
p->horizon.ohorizoff = p->horizon.horizoff = pitchhoriz(nullAngle.Degrees());
|
||||
p->bobcounter = 0;
|
||||
p->on_ground = 0;
|
||||
p->player_par = 0;
|
||||
|
|
|
@ -410,7 +410,7 @@ void RestartPlayer(int nPlayer)
|
|||
|
||||
plr->nThrust.Zero();
|
||||
|
||||
plr->nDestVertPan = plr->horizon.ohoriz = plr->horizon.horiz = q16horiz(0);
|
||||
plr->nDestVertPan = plr->horizon.ohoriz = plr->horizon.horiz = pitchhoriz(nullAngle.Degrees());
|
||||
plr->nBreathTimer = 90;
|
||||
|
||||
plr->nTauntTimer = RandomSize(3) + 3;
|
||||
|
@ -506,7 +506,7 @@ void StartDeathSeq(int nPlayer, int nVal)
|
|||
|
||||
StopFiringWeapon(nPlayer);
|
||||
|
||||
PlayerList[nPlayer].horizon.ohoriz = PlayerList[nPlayer].horizon.horiz = q16horiz(0);
|
||||
PlayerList[nPlayer].horizon.ohoriz = PlayerList[nPlayer].horizon.horiz = pitchhoriz(nullAngle.Degrees());
|
||||
PlayerList[nPlayer].oeyelevel = PlayerList[nPlayer].eyelevel = -55;
|
||||
PlayerList[nPlayer].nInvisible = 0;
|
||||
dVertPan[nPlayer] = 15;
|
||||
|
@ -1091,7 +1091,7 @@ void AIPlayer::Tick(RunListEvent* ev)
|
|||
StopLocalSound();
|
||||
InitSpiritHead();
|
||||
|
||||
PlayerList[nPlayer].nDestVertPan = q16horiz(0);
|
||||
PlayerList[nPlayer].nDestVertPan = pitchhoriz(nullAngle.Degrees());
|
||||
PlayerList[nPlayer].horizon.settarget(buildhoriz(currentLevel->ex_ramses_horiz));
|
||||
}
|
||||
}
|
||||
|
@ -1119,7 +1119,7 @@ void AIPlayer::Tick(RunListEvent* ev)
|
|||
}
|
||||
|
||||
if (zVelB > 2 && !PlayerList[nPlayer].horizon.horiz.Sgn() && cl_slopetilting) {
|
||||
PlayerList[nPlayer].nDestVertPan = q16horiz(0);
|
||||
PlayerList[nPlayer].nDestVertPan = pitchhoriz(nullAngle.Degrees());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -192,7 +192,7 @@ void DrawView(double interpfrac, bool sceneonly)
|
|||
int nEnemyPal = -1;
|
||||
sectortype* pSector = nullptr;
|
||||
DAngle nCameraang, rotscrnang;
|
||||
fixedhoriz nCamerapan = q16horiz(0);
|
||||
fixedhoriz nCamerapan = pitchhoriz(nullAngle.Degrees());
|
||||
|
||||
DoInterpolations(interpfrac);
|
||||
|
||||
|
@ -259,7 +259,7 @@ void DrawView(double interpfrac, bool sceneonly)
|
|||
|
||||
if (nSnakeCam >= 0 && !sceneonly)
|
||||
{
|
||||
nCamerapan = q16horiz(0);
|
||||
nCamerapan = pitchhoriz(nullAngle.Degrees());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -6157,7 +6157,7 @@ void DoPlayerDeathCheckKeys(PLAYER* pp)
|
|||
plActor->spr.xrepeat = PLAYER_NINJA_XREPEAT;
|
||||
plActor->spr.yrepeat = PLAYER_NINJA_YREPEAT;
|
||||
|
||||
pp->horizon.horiz = q16horiz(0);
|
||||
pp->horizon.horiz = pitchhoriz(nullAngle.Degrees());
|
||||
DoPlayerResetMovement(pp);
|
||||
plActor->user.ID = NINJA_RUN_R0;
|
||||
PlayerDeathReset(pp);
|
||||
|
@ -7174,7 +7174,7 @@ void InitAllPlayers(void)
|
|||
extern bool NewGame;
|
||||
//int fz,cz;
|
||||
|
||||
pfirst->horizon.horiz = q16horiz(0);
|
||||
pfirst->horizon.horiz = pitchhoriz(nullAngle.Degrees());
|
||||
|
||||
// Initialize all [MAX_SW_PLAYERS] arrays here!
|
||||
for (pp = Player; pp < &Player[MAX_SW_PLAYERS]; pp++)
|
||||
|
@ -7218,7 +7218,7 @@ void InitAllPlayers(void)
|
|||
pp->FadeAmt = 0;
|
||||
pp->FadeTics = 0;
|
||||
pp->StartColor = 0;
|
||||
pp->horizon.horizoff = q16horiz(0);
|
||||
pp->horizon.horizoff = pitchhoriz(nullAngle.Degrees());
|
||||
|
||||
INITLIST(&pp->PanelSpriteList);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue