mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-20 18:52:43 +00:00
- Eliminate remaining calls to TAngle<T>::fromBuildf()
.
This commit is contained in:
parent
789fa71a14
commit
bb6e12a2b1
3 changed files with 5 additions and 8 deletions
|
@ -1286,11 +1286,6 @@ public:
|
|||
return TAngle(bang * (90. / 512));
|
||||
}
|
||||
|
||||
static constexpr TAngle fromBuildf(double bang)
|
||||
{
|
||||
return TAngle(bang * (90. / 512));
|
||||
}
|
||||
|
||||
static constexpr TAngle fromQ16(int bang)
|
||||
{
|
||||
return TAngle(bang * (90. / 16384));
|
||||
|
|
|
@ -413,7 +413,7 @@ void viewUpdateShake(PLAYER* pPlayer, DVector3& cPos, DAngle& cA, DAngle& cH, do
|
|||
{
|
||||
int nValue = ClipHigh(effectType * 8, 2000);
|
||||
cH += maphoriz(QRandom2F(nValue * (1. / 256.)));
|
||||
cA += DAngle::fromBuildf(QRandom2F(nValue * (1. / 256.)));
|
||||
cA += DAngle::fromDeg(QRandom2F(nValue * (360. / 524288.)));
|
||||
cPos.X += QRandom2F(nValue * inttoworld) * inttoworld;
|
||||
cPos.Y += QRandom2F(nValue * inttoworld) * inttoworld;
|
||||
cPos.Z += QRandom2F(nValue) * zinttoworld;
|
||||
|
|
|
@ -2377,7 +2377,8 @@ void onMotorcycleMove(int snum, walltype* wal)
|
|||
double angleDelta = absangle(p->angle.ang, VecToAngle(wal->delta())).Degrees();
|
||||
double damageAmount = p->MotoSpeed * p->MotoSpeed;
|
||||
|
||||
p->angle.addadjustment(DAngle::fromBuildf(p->MotoSpeed / (krand() & 1 ? -2 : 2)));
|
||||
const double scale = (180. / 2048.);
|
||||
p->angle.addadjustment(DAngle::fromDeg(p->MotoSpeed * (krand() & 1 ? -scale : scale)));
|
||||
|
||||
// That's some very weird angles here...
|
||||
if (angleDelta >= 77.51 && angleDelta <= 102.13)
|
||||
|
@ -2431,7 +2432,8 @@ void onBoatMove(int snum, int psectlotag, walltype* wal)
|
|||
auto pact = p->GetActor();
|
||||
double angleDelta = absangle(p->angle.ang, VecToAngle(wal->delta())).Degrees();
|
||||
|
||||
p->angle.addadjustment(DAngle::fromBuildf(p->MotoSpeed / (krand() & 1 ? -4 : 4)));
|
||||
const double scale = (90. / 2048.);
|
||||
p->angle.addadjustment(DAngle::fromDeg(p->MotoSpeed * (krand() & 1 ? -scale : scale)));
|
||||
|
||||
if (angleDelta >= 77.51 && angleDelta <= 102.13)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue