mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +00:00
Merge pull request #1991 from AlexBarys/AITurretIgnoreListFunctions
Ai turret ignore list functions
This commit is contained in:
commit
eded563ec2
2 changed files with 27 additions and 0 deletions
|
|
@ -564,6 +564,16 @@ void AITurretShape::removeFromIgnoreList(ShapeBase* obj)
|
||||||
mIgnoreObjects.removeObject(obj);
|
mIgnoreObjects.removeObject(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
S32 AITurretShape::ignoreListCount()
|
||||||
|
{
|
||||||
|
return mIgnoreObjects.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
SimObject* AITurretShape::getIgnoreListObject(S32 index)
|
||||||
|
{
|
||||||
|
return mIgnoreObjects.at(index);
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
void AITurretShape::_initState()
|
void AITurretShape::_initState()
|
||||||
|
|
@ -1244,6 +1254,21 @@ DefineEngineMethod( AITurretShape, removeFromIgnoreList, void, (ShapeBase* obj),
|
||||||
object->removeFromIgnoreList(obj);
|
object->removeFromIgnoreList(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DefineEngineMethod( AITurretShape, ignoreListCount, S32, (),,
|
||||||
|
"@brief Returns the number of objects in the turrets ignore list.\n\n"
|
||||||
|
"All objects in this list will be ignored by the turret's targeting.\n")
|
||||||
|
{
|
||||||
|
return object->ignoreListCount();
|
||||||
|
}
|
||||||
|
|
||||||
|
DefineEngineMethod( AITurretShape, getIgnoreListObject, SimObject*, (S32 index),,
|
||||||
|
"@brief Returns the object in the ignore list at index.\n\n"
|
||||||
|
"All objects in this list will be ignored by the turret's targeting.\n"
|
||||||
|
"@param index The index of the object in the ignore list being retrieved.\n")
|
||||||
|
{
|
||||||
|
return object->getIgnoreListObject(index);
|
||||||
|
}
|
||||||
|
|
||||||
DefineEngineMethod( AITurretShape, setTurretState, void, (const char* newState, bool force), (false),
|
DefineEngineMethod( AITurretShape, setTurretState, void, (const char* newState, bool force), (false),
|
||||||
"@brief Set the turret's current state.\n\n"
|
"@brief Set the turret's current state.\n\n"
|
||||||
"Normally the turret's state comes from updating the state machine but this method "
|
"Normally the turret's state comes from updating the state machine but this method "
|
||||||
|
|
|
||||||
|
|
@ -257,6 +257,8 @@ public:
|
||||||
|
|
||||||
void addToIgnoreList(ShapeBase* obj);
|
void addToIgnoreList(ShapeBase* obj);
|
||||||
void removeFromIgnoreList(ShapeBase* obj);
|
void removeFromIgnoreList(ShapeBase* obj);
|
||||||
|
S32 ignoreListCount();
|
||||||
|
SimObject* getIgnoreListObject(S32 index);
|
||||||
|
|
||||||
void setTurretStateName(const char* newState, bool force=false);
|
void setTurretStateName(const char* newState, bool force=false);
|
||||||
void setTurretState(U32 newState, bool force=false);
|
void setTurretState(U32 newState, bool force=false);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue