1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-20 20:29:10 +00:00

Eliminate hsScalar and hsFixed

Modern CPUs support floats just fine... hsFixed was crazy.
This commit is contained in:
2012-01-21 02:03:37 -05:00
parent 5027b5a4ac
commit e020651e4b
584 changed files with 5401 additions and 6399 deletions

View File

@ -105,7 +105,7 @@ plAvLadderMod::plAvLadderMod(bool goingUp, int type, int loops, bool enabled, hs
}
// Must be facing within 45 degrees of the ladder
static const hsScalar kTolerance = hsCosine(hsScalarDegToRad(45));
static const float kTolerance = cos(hsDegreesToRadians(45));
bool plAvLadderMod::IIsReadyToClimb()
{
@ -120,7 +120,7 @@ bool plAvLadderMod::IIsReadyToClimb()
playerView.fZ = 0;
// Are we facing towards the ladder?
hsScalar dot = playerView * fLadderView;
float dot = playerView * fLadderView;
bool movingForward = false;
@ -135,12 +135,12 @@ bool plAvLadderMod::IIsReadyToClimb()
if (dot >= kTolerance && movingForward)
{
DetectorLogSpecial("%s: Ladder starting climb (%f)", GetKeyName(), hsScalarRadToDeg(hsACosine(dot)));
DetectorLogSpecial("%s: Ladder starting climb (%f)", GetKeyName(), hsRadiansToDegrees(acos(dot)));
return true;
}
else if (movingForward)
{
// DetectorLog("%s: Ladder rejecting climb (%f)", GetKeyName(), hsScalarRadToDeg(hsACosine(dot)));
// DetectorLog("%s: Ladder rejecting climb (%f)", GetKeyName(), hsRadiansToDegrees(acos(dot)));
return false;
}
}