1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-30 20:15:35 +00:00

Change abs to std::abs

This commit is contained in:
Grigorii Latyshev 2017-11-13 21:36:55 +01:00
parent a7fd27f413
commit 6e4f6c4bd5

View file

@ -55,7 +55,7 @@ bool AiPursue::execute (const MWWorld::Ptr& actor, CharacterController& characte
float pathTolerance = 100.0;
if (pathTo(actor, dest, duration, pathTolerance) &&
abs(dest.mZ - aPos.pos[2]) < pathTolerance) // check the true distance in case the target is far away in Z-direction
std::abs(dest.mZ - aPos.pos[2]) < pathTolerance) // check the true distance in case the target is far away in Z-direction
{
target.getClass().activate(target,actor).get()->execute(actor); //Arrest player when reached
return true;