mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 14:44:36 +00:00
Merge branch 'development' into AITurretClearIgnoreList
This commit is contained in:
commit
f2733d79f8
84 changed files with 255 additions and 216 deletions
|
|
@ -880,8 +880,8 @@ IMPLEMENT_CALLBACK( ShapeBase, validateCameraFov, F32, (F32 fov), (fov),
|
|||
ShapeBase::ShapeBase()
|
||||
: mDataBlock( NULL ),
|
||||
mIsAiControlled( false ),
|
||||
mAiPose( 0 ),
|
||||
mControllingObject( NULL ),
|
||||
mAiPose( 0 ),
|
||||
mMoveMotion( false ),
|
||||
mShapeBaseMount( NULL ),
|
||||
mShapeInstance( NULL ),
|
||||
|
|
|
|||
|
|
@ -569,6 +569,16 @@ void AITurretShape::clearIgnoreList()
|
|||
mIgnoreObjects.clear();
|
||||
}
|
||||
|
||||
S32 AITurretShape::ignoreListCount()
|
||||
{
|
||||
return mIgnoreObjects.size();
|
||||
}
|
||||
|
||||
SimObject* AITurretShape::getIgnoreListObject(S32 index)
|
||||
{
|
||||
return mIgnoreObjects.at(index);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
void AITurretShape::_initState()
|
||||
|
|
@ -1256,6 +1266,21 @@ DefineEngineMethod( AITurretShape, clearIgnoreList, void, (),,
|
|||
object->clearIgnoreList();
|
||||
}
|
||||
|
||||
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),
|
||||
"@brief Set the turret's current state.\n\n"
|
||||
"Normally the turret's state comes from updating the state machine but this method "
|
||||
|
|
|
|||
|
|
@ -258,6 +258,8 @@ public:
|
|||
void addToIgnoreList(ShapeBase* obj);
|
||||
void removeFromIgnoreList(ShapeBase* obj);
|
||||
void clearIgnoreList();
|
||||
S32 ignoreListCount();
|
||||
SimObject* getIgnoreListObject(S32 index);
|
||||
|
||||
void setTurretStateName(const char* newState, bool force=false);
|
||||
void setTurretState(U32 newState, bool force=false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue