1
0

Merge pull request #2443 from mjhanninen/fix-osx-build-due-warnings

Qualify abs with namespace, use explicit cast
This commit is contained in:
Tiger Wang 2015-08-22 12:54:36 +01:00
commit 1cb612ccdc

View File

@ -2124,7 +2124,7 @@ void cPlayer::UpdateMovementStats(const Vector3d & a_DeltaPos, bool a_PreviousIs
else if (a_DeltaPos.y < 0.0)
{
// Increment statistic
m_Stats.AddValue(statDistFallen, (StatValue)(abs(a_DeltaPos.y) * 100 + 0.5));
m_Stats.AddValue(statDistFallen, static_cast<StatValue>(std::abs(a_DeltaPos.y) * 100 + 0.5));
}
// TODO: good opportunity to detect illegal flight (check for falling tho)
}