mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- Blood: Remove all remaining angle wrapper usage.
This commit is contained in:
parent
1aad5eacfa
commit
d3bc2f39a4
3 changed files with 7 additions and 6 deletions
|
@ -9278,7 +9278,7 @@ void changeSpriteAngle(DBloodActor* pSpr, DAngle nAng)
|
||||||
{
|
{
|
||||||
PLAYER* pPlayer = getPlayerById(pSpr->spr.type);
|
PLAYER* pPlayer = getPlayerById(pSpr->spr.type);
|
||||||
if (pPlayer)
|
if (pPlayer)
|
||||||
pPlayer->Angles.ZzANGLE() = nAng;
|
pPlayer->actor->spr.Angles.Yaw = nAng;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pSpr->spr.Angles.Yaw = nAng;
|
pSpr->spr.Angles.Yaw = nAng;
|
||||||
|
|
|
@ -40,7 +40,8 @@ void GameInterface::WarpToCoords(double x, double y, double z, DAngle ang)
|
||||||
|
|
||||||
if (ang != DAngle::fromDeg(INT_MIN))
|
if (ang != DAngle::fromDeg(INT_MIN))
|
||||||
{
|
{
|
||||||
pPlayer->Angles.ZzOLDANGLE() = pPlayer->Angles.ZzANGLE() = ang;
|
pPlayer->actor->spr.Angles.Yaw = ang;
|
||||||
|
pPlayer->actor->backupang();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -822,7 +822,7 @@ void playerStart(int nPlayer, int bNewLevel)
|
||||||
pPlayer->actor->xspr.health = pDudeInfo->startHealth << 4;
|
pPlayer->actor->xspr.health = pDudeInfo->startHealth << 4;
|
||||||
pPlayer->actor->spr.cstat &= ~CSTAT_SPRITE_INVISIBLE;
|
pPlayer->actor->spr.cstat &= ~CSTAT_SPRITE_INVISIBLE;
|
||||||
pPlayer->bloodlust = 0;
|
pPlayer->bloodlust = 0;
|
||||||
pPlayer->Angles.ZzHORIZON() = pPlayer->Angles.ViewAngles.Pitch = nullAngle;
|
pPlayer->actor->spr.Angles.Pitch = pPlayer->Angles.ViewAngles.Pitch = nullAngle;
|
||||||
pPlayer->slope = 0;
|
pPlayer->slope = 0;
|
||||||
pPlayer->fragger = nullptr;
|
pPlayer->fragger = nullptr;
|
||||||
pPlayer->underwaterTime = 1200;
|
pPlayer->underwaterTime = 1200;
|
||||||
|
@ -1544,11 +1544,11 @@ void ProcessInput(PLAYER* pPlayer)
|
||||||
DBloodActor* fragger = pPlayer->fragger;
|
DBloodActor* fragger = pPlayer->fragger;
|
||||||
if (fragger)
|
if (fragger)
|
||||||
{
|
{
|
||||||
pPlayer->Angles.addYaw(deltaangle(pPlayer->Angles.ZzANGLE(), (fragger->spr.pos.XY() - actor->spr.pos.XY()).Angle()));
|
pPlayer->Angles.addYaw(deltaangle(pPlayer->actor->spr.Angles.Yaw, (fragger->spr.pos.XY() - actor->spr.pos.XY()).Angle()));
|
||||||
}
|
}
|
||||||
pPlayer->deathTime += 4;
|
pPlayer->deathTime += 4;
|
||||||
if (!bSeqStat)
|
if (!bSeqStat)
|
||||||
pPlayer->Angles.addPitch(deltaangle(pPlayer->Angles.ZzHORIZON(), gi->playerPitchMax() * (1. - BobVal(min((pPlayer->deathTime << 3) + 512, 1536))) * 0.5));
|
pPlayer->Angles.addPitch(deltaangle(pPlayer->actor->spr.Angles.Pitch, gi->playerPitchMax() * (1. - BobVal(min((pPlayer->deathTime << 3) + 512, 1536))) * 0.5));
|
||||||
if (pPlayer->curWeapon)
|
if (pPlayer->curWeapon)
|
||||||
pInput->setNewWeapon(pPlayer->curWeapon);
|
pInput->setNewWeapon(pPlayer->curWeapon);
|
||||||
if (pInput->actions & SB_OPEN)
|
if (pInput->actions & SB_OPEN)
|
||||||
|
@ -1722,7 +1722,7 @@ void ProcessInput(PLAYER* pPlayer)
|
||||||
pPlayer->Angles.unlockYaw();
|
pPlayer->Angles.unlockYaw();
|
||||||
pPlayer->Angles.unlockPitch();
|
pPlayer->Angles.unlockPitch();
|
||||||
|
|
||||||
pPlayer->slope = pPlayer->Angles.ZzHORIZON().Tan();
|
pPlayer->slope = pPlayer->actor->spr.Angles.Pitch.Tan();
|
||||||
if (pInput->actions & SB_INVPREV)
|
if (pInput->actions & SB_INVPREV)
|
||||||
{
|
{
|
||||||
pInput->actions &= ~SB_INVPREV;
|
pInput->actions &= ~SB_INVPREV;
|
||||||
|
|
Loading…
Reference in a new issue