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

Complete the previous commit by also removing the inline min and max

functions defined in HeadSpin.h without breaking (3ds)Max compilation
This commit is contained in:
2014-07-22 22:22:22 -07:00
parent e36220cca5
commit 72f18e8ebb
20 changed files with 49 additions and 86 deletions

View File

@ -439,9 +439,9 @@ void plArmatureModBase::AdjustLOD()
hsPoint3 delta = ourPos - camPos;
float distanceSquared = delta.MagnitudeSquared();
if (distanceSquared < fLODDistance * fLODDistance)
SetLOD(max(0, fMinLOD));
SetLOD(std::max(0, fMinLOD));
else if (distanceSquared < fLODDistance * fLODDistance * 4.0)
SetLOD(max(1, fMinLOD));
SetLOD(std::max(1, fMinLOD));
else
SetLOD(2);
}

View File

@ -106,7 +106,7 @@ void plArmatureBehavior::DumpDebug(int &x, int &y, int lineHeight, plDebugText &
float strength = GetStrength();
const char *onOff = strength > 0 ? "on" : "off";
char blendBar[] = "||||||||||";
int bars = (int)min(10 * strength, 10);
int bars = std::min(static_cast<int>(10 * strength), 10);
blendBar[bars] = '\0';
plString details;

View File

@ -179,7 +179,7 @@ public:
float oldSpeed = fabs(fSwimBrain->fSwimStrategy->GetTurnStrength());
float thisInc = elapsed * incPerSec;
float newSpeed = min(oldSpeed + thisInc, maxTurnSpeed);
float newSpeed = std::min(oldSpeed + thisInc, maxTurnSpeed);
fSwimBrain->fSwimStrategy->SetTurnStrength(newSpeed * fAvMod->GetKeyTurnStrength() + fAvMod->GetAnalogTurnStrength());
// the turn is actually applied during PhysicsUpdate
}

View File

@ -577,7 +577,7 @@ bool plWalkingStrategy::EnableControlledFlight(bool status)
++fControlledFlight;
}
else
fControlledFlight = max(--fControlledFlight, 0);
fControlledFlight = std::max(--fControlledFlight, 0);
return status;
}