Explorar o código

distance needs to be returned as a float.

Azaezel %!s(int64=9) %!d(string=hai) anos
pai
achega
e12536efcd
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Engine/source/T3D/aiPlayer.cpp

+ 1 - 1
Engine/source/T3D/aiPlayer.cpp

@@ -1440,7 +1440,7 @@ F32 AIPlayer::getTargetDistance(GameBase* target, bool _checkEnabled)
    return (getPosition() - target->getPosition()).len();
 }
 
-DefineEngineMethod(AIPlayer, getTargetDistance, bool, (ShapeBase* obj, bool checkEnabled), (NULL, false),
+DefineEngineMethod(AIPlayer, getTargetDistance, F32, (ShapeBase* obj, bool checkEnabled), (NULL, false),
    "@brief Check whether an object is within a specified veiw cone.\n"
    "@obj Object to check. (If blank, it will check the current target).\n"
    "@fov view angle in degrees.(Defaults to 45)\n"