mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-31 12:30:40 +00:00
- Exhumed: Remove all remaining angle wrapper usage.
This commit is contained in:
parent
dfb55c39ca
commit
58c1efb8de
4 changed files with 14 additions and 14 deletions
|
@ -729,7 +729,7 @@ loc_flag:
|
|||
// loc_27266:
|
||||
case kWeaponSword:
|
||||
{
|
||||
nHeight += PlayerList[nLocalPlayer].Angles.ZzHORIZON().Tan() * 32.;
|
||||
nHeight += PlayerList[nLocalPlayer].pActor->spr.Angles.Pitch.Tan() * 32.;
|
||||
|
||||
thePos.Z += nHeight;
|
||||
|
||||
|
@ -834,7 +834,7 @@ loc_flag:
|
|||
}
|
||||
case kWeaponPistol:
|
||||
{
|
||||
double h = PlayerList[nLocalPlayer].Angles.ZzHORIZON().Tan() * 2.;
|
||||
double h = PlayerList[nLocalPlayer].pActor->spr.Angles.Pitch.Tan() * 2.;
|
||||
nHeight += h;
|
||||
|
||||
DExhumedActor* target = nullptr;
|
||||
|
@ -858,7 +858,7 @@ loc_flag:
|
|||
|
||||
case kWeaponGrenade:
|
||||
{
|
||||
ThrowGrenade(nPlayer, nHeight - 10, PlayerList[nLocalPlayer].Angles.ZzHORIZON().Tan());
|
||||
ThrowGrenade(nPlayer, nHeight - 10, PlayerList[nLocalPlayer].pActor->spr.Angles.Pitch.Tan());
|
||||
break;
|
||||
}
|
||||
case kWeaponStaff:
|
||||
|
|
|
@ -48,7 +48,7 @@ void GameInterface::WarpToCoords(double x, double y, double z, DAngle ang)
|
|||
|
||||
if (ang != DAngle::fromDeg(INT_MIN))
|
||||
{
|
||||
nPlayer->Angles.ZzOLDANGLE() = nPlayer->Angles.ZzANGLE() = ang;
|
||||
nPlayer->pActor->PrevAngles.Yaw = nPlayer->pActor->spr.Angles.Yaw = ang;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -408,7 +408,7 @@ void RestartPlayer(int nPlayer)
|
|||
|
||||
plr->nThrust.Zero();
|
||||
|
||||
plr->nDestVertPan = plr->Angles.ZzOLDHORIZON() = plr->Angles.ZzHORIZON() = nullAngle;
|
||||
plr->nDestVertPan = plr->pActor->PrevAngles.Pitch = plr->pActor->spr.Angles.Pitch = nullAngle;
|
||||
plr->nBreathTimer = 90;
|
||||
|
||||
plr->nTauntTimer = RandomSize(3) + 3;
|
||||
|
@ -504,7 +504,7 @@ void StartDeathSeq(int nPlayer, int nVal)
|
|||
|
||||
StopFiringWeapon(nPlayer);
|
||||
|
||||
PlayerList[nPlayer].Angles.ZzOLDHORIZON() = PlayerList[nPlayer].Angles.ZzHORIZON() = nullAngle;
|
||||
PlayerList[nPlayer].pActor->PrevAngles.Pitch = PlayerList[nPlayer].pActor->spr.Angles.Pitch = 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].Angles.ZzHORIZON().Sgn() && cl_slopetilting) {
|
||||
if (zVelB > 2 && !PlayerList[nPlayer].pActor->spr.Angles.Pitch.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->Angles.ZzHORIZON();
|
||||
pPlayer->nDestVertPan = pPlayer->pActor->spr.Angles.Pitch;
|
||||
pPlayer->bPlayerPan = pPlayer->bLockPan = true;
|
||||
}
|
||||
else if (actions & (SB_LOOK_UP | SB_LOOK_DOWN | SB_CENTERVIEW))
|
||||
{
|
||||
pPlayer->nDestVertPan = pPlayer->Angles.ZzHORIZON();
|
||||
pPlayer->nDestVertPan = pPlayer->pActor->spr.Angles.Pitch;
|
||||
pPlayer->bPlayerPan = pPlayer->bLockPan = false;
|
||||
}
|
||||
|
||||
|
@ -2496,7 +2496,7 @@ sectdone:
|
|||
|
||||
if (cl_slopetilting && !pPlayer->bPlayerPan && !pPlayer->bLockPan)
|
||||
{
|
||||
if (double nVertPan = deltaangle(pPlayer->Angles.ZzHORIZON(), pPlayer->nDestVertPan).Tan() * 32.)
|
||||
if (double nVertPan = deltaangle(pPlayer->pActor->spr.Angles.Pitch, pPlayer->nDestVertPan).Tan() * 32.)
|
||||
{
|
||||
pPlayer->Angles.addPitch(maphoriz(abs(nVertPan) >= 4 ? clamp(nVertPan, -4., 4.) : nVertPan * 2.));
|
||||
}
|
||||
|
@ -2616,7 +2616,7 @@ sectdone:
|
|||
}
|
||||
else
|
||||
{
|
||||
if (PlayerList[nPlayer].Angles.ZzHORIZON().Sgn() > 0)
|
||||
if (PlayerList[nPlayer].pActor->spr.Angles.Pitch.Sgn() > 0)
|
||||
{
|
||||
PlayerList[nPlayer].Angles.setPitch(nullAngle);
|
||||
pPlayerActor->viewzoffset -= dVertPan[nPlayer];
|
||||
|
@ -2625,11 +2625,11 @@ sectdone:
|
|||
{
|
||||
PlayerList[nPlayer].Angles.addPitch(maphoriz(-dVertPan[nPlayer]));
|
||||
|
||||
if (PlayerList[nPlayer].Angles.ZzHORIZON().Degrees() <= 38)
|
||||
if (PlayerList[nPlayer].pActor->spr.Angles.Pitch.Degrees() <= 38)
|
||||
{
|
||||
PlayerList[nPlayer].Angles.setPitch(DAngle::fromDeg(-37.72));
|
||||
}
|
||||
else if (PlayerList[nPlayer].Angles.ZzHORIZON().Sgn() >= 0)
|
||||
else if (PlayerList[nPlayer].pActor->spr.Angles.Pitch.Sgn() >= 0)
|
||||
{
|
||||
if (!(pPlayerActor->sector()->Flag & kSectUnderwater))
|
||||
{
|
||||
|
|
|
@ -414,7 +414,7 @@ void seq_DrawPilotLightSeq(double xOffset, double yOffset)
|
|||
double x = ChunkXpos[nFrameBase] + (160 + xOffset);
|
||||
double y = ChunkYpos[nFrameBase] + (100 + yOffset);
|
||||
|
||||
hud_drawsprite(x, y, 65536, fmod(-2 * PlayerList[nLocalPlayer].Angles.ZzANGLE().Buildfang(), kAngleMask + 1), nTile, 0, 0, 1);
|
||||
hud_drawsprite(x, y, 65536, fmod(-2 * PlayerList[nLocalPlayer].pActor->spr.Angles.Yaw.Buildfang(), kAngleMask + 1), nTile, 0, 0, 1);
|
||||
nFrameBase++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue