mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- Rename PlayerAngle::spin
to its destined final name.
This commit is contained in:
parent
a42750f37f
commit
a061f2baef
6 changed files with 15 additions and 15 deletions
|
@ -242,31 +242,31 @@ void PlayerAngle::applyinput(float const avel, ESyncBits* actions, double const
|
|||
|
||||
if (*actions & SB_TURNAROUND)
|
||||
{
|
||||
if (spin == nullAngle)
|
||||
if (YawSpin == nullAngle)
|
||||
{
|
||||
// currently not spinning, so start a spin
|
||||
spin = -DAngle180;
|
||||
YawSpin = -DAngle180;
|
||||
}
|
||||
*actions &= ~SB_TURNAROUND;
|
||||
}
|
||||
|
||||
if (spin < nullAngle)
|
||||
if (YawSpin < nullAngle)
|
||||
{
|
||||
// return spin to 0
|
||||
DAngle add = getTicrateScale(!(*actions & SB_CROUCH) ? YAW_SPINSTAND : YAW_SPINCROUCH) * scaleAdjust;
|
||||
spin += add;
|
||||
if (spin > nullAngle)
|
||||
YawSpin += add;
|
||||
if (YawSpin > nullAngle)
|
||||
{
|
||||
// Don't overshoot our target. With variable factor this is possible.
|
||||
add -= spin;
|
||||
spin = nullAngle;
|
||||
add -= YawSpin;
|
||||
YawSpin = nullAngle;
|
||||
}
|
||||
ZzANGLE += add;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
spin = nullAngle;
|
||||
YawSpin = nullAngle;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -337,7 +337,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, PlayerAngle& w, Pl
|
|||
arc("ang", w.ZzANGLE)
|
||||
("lookang", w.ZzLOOKANG)
|
||||
("rotscrnang", w.ZzROTSCRNANG)
|
||||
("spin", w.spin)
|
||||
("spin", w.YawSpin)
|
||||
("inputdisabled", w.inputdisabled)
|
||||
.EndObject();
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ private:
|
|||
|
||||
struct PlayerAngle
|
||||
{
|
||||
DAngle ZzANGLE, ZzOLDANGLE, ZzLOOKANG, ZzOLDLOOKANG, ZzROTSCRNANG, ZzOLDROTSCRNANG, spin;
|
||||
DAngle ZzANGLE, ZzOLDANGLE, ZzLOOKANG, ZzOLDLOOKANG, ZzROTSCRNANG, ZzOLDROTSCRNANG, YawSpin;
|
||||
|
||||
friend FSerializer& Serialize(FSerializer& arc, const char* keyname, PlayerAngle& w, PlayerAngle* def);
|
||||
|
||||
|
|
|
@ -829,7 +829,7 @@ void playerStart(int nPlayer, int bNewLevel)
|
|||
pPlayer->restTime = 0;
|
||||
pPlayer->kickPower = 0;
|
||||
pPlayer->laughCount = 0;
|
||||
pPlayer->angle.spin = nullAngle;
|
||||
pPlayer->angle.YawSpin = nullAngle;
|
||||
pPlayer->posture = 0;
|
||||
pPlayer->voodooTarget = nullptr;
|
||||
pPlayer->voodooTargets = 0;
|
||||
|
|
|
@ -650,8 +650,8 @@ void DoPlayer(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
|
|||
break;
|
||||
|
||||
case PLAYER_ONE_EIGHTY_COUNT:
|
||||
if (bSet) ps[iPlayer].angle.spin = mapangle(lValue);
|
||||
else SetGameVarID(lVar2, ps[iPlayer].angle.spin.Buildang(), sActor, sPlayer);
|
||||
if (bSet) ps[iPlayer].angle.YawSpin = mapangle(lValue);
|
||||
else SetGameVarID(lVar2, ps[iPlayer].angle.YawSpin.Buildang(), sActor, sPlayer);
|
||||
break;
|
||||
|
||||
case PLAYER_CHEAT_PHASE:
|
||||
|
|
|
@ -476,7 +476,7 @@ void hud_input(int plnum)
|
|||
}
|
||||
}
|
||||
|
||||
if (PlayerInput(plnum, SB_TURNAROUND) && p->angle.spin == nullAngle && p->on_crane == nullptr)
|
||||
if (PlayerInput(plnum, SB_TURNAROUND) && p->angle.YawSpin == nullAngle && p->on_crane == nullptr)
|
||||
{
|
||||
SetGameVarID(g_iReturnVarID, 0, nullptr, plnum);
|
||||
OnEvent(EVENT_TURNAROUND, plnum, nullptr, -1);
|
||||
|
|
|
@ -161,7 +161,7 @@ void resetplayerstats(int snum)
|
|||
p->fric.X = 0;
|
||||
p->fric.Y = 0;
|
||||
p->somethingonplayer = nullptr;
|
||||
p->angle.spin = nullAngle;
|
||||
p->angle.YawSpin = nullAngle;
|
||||
|
||||
p->on_crane = nullptr;
|
||||
|
||||
|
|
Loading…
Reference in a new issue