mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
Merge pull request #1795 from Azaezel/doBeDistant
ai: distance needs to be returned as a float.
This commit is contained in:
commit
c0482b1b1a
1 changed files with 2 additions and 3 deletions
|
|
@ -1440,10 +1440,9 @@ F32 AIPlayer::getTargetDistance(GameBase* target, bool _checkEnabled)
|
||||||
return (getPosition() - target->getPosition()).len();
|
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"
|
"@brief The distance to a given object.\n"
|
||||||
"@obj Object to check. (If blank, it will check the current target).\n"
|
"@obj Object to check. (If blank, it will check the current target).\n"
|
||||||
"@fov view angle in degrees.(Defaults to 45)\n"
|
|
||||||
"@checkEnabled check whether the object can take damage and if so is still alive.(Defaults to false)\n")
|
"@checkEnabled check whether the object can take damage and if so is still alive.(Defaults to false)\n")
|
||||||
{
|
{
|
||||||
return object->getTargetDistance(obj, checkEnabled);
|
return object->getTargetDistance(obj, checkEnabled);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue