Merge pull request #1551 from thegriglat/abs

Change abs to std::abs
new-script-api
scrawl 7 years ago committed by GitHub
commit cf40d19d7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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;

Loading…
Cancel
Save