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

Use std::min and std::max

This commit is contained in:
2014-07-22 21:12:09 -07:00
parent 4f5a941d41
commit e36220cca5
35 changed files with 101 additions and 108 deletions

View File

@ -402,7 +402,7 @@ void plWalkingStrategy::Apply(float delSecs)
// the largest, so we won't launch into the air if we're running uphill.
float prevZVel = achievedVelocity.fZ;
if (IsOnGround())
prevZVel = hsMinimum(prevZVel, 0.0f);
prevZVel = std::min(prevZVel, 0.0f);
velocity.fZ = prevZVel + (kGravity * delSecs);
}
@ -716,7 +716,7 @@ void plDynamicWalkingStrategy::Apply(float delSecs)
// the largest, so we won't launch into the air if we're running uphill.
float prevZVel = achievedVelocity.fZ;
if (IsOnGround())
prevZVel = hsMinimum(prevZVel, 0.f);
prevZVel = std::min(prevZVel, 0.f);
velocity.fZ = prevZVel + (kGravity * delSecs);
}