mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 08:34:40 +00:00
aitriggers a navtool. not ready for general consumption just yet
This commit is contained in:
parent
91ff953c19
commit
b160017c7d
2 changed files with 0 additions and 38 deletions
|
|
@ -929,26 +929,3 @@ DefineEngineMethod( Trigger, getObject, S32, ( S32 index ),,
|
||||||
else
|
else
|
||||||
return object->getObject(U32(index))->getId();
|
return object->getObject(U32(index))->getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPLEMENT_CO_NETOBJECT_V1(AITrigger);
|
|
||||||
AITrigger::AITrigger()
|
|
||||||
{
|
|
||||||
for (S32 i = 0; i < AI_NAVCHOICES; i++)
|
|
||||||
{
|
|
||||||
mProbability[i] = 100 / AI_NAVCHOICES;
|
|
||||||
mWaypoints[i] = StringTable->insert("-1");
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
AITrigger::~AITrigger()
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
void AITrigger::initPersistFields()
|
|
||||||
{
|
|
||||||
addField("waypoint", TypeString, Offset(mWaypoints, AITrigger), AI_NAVCHOICES,
|
|
||||||
"waypoint name\"\n");
|
|
||||||
addField("probability", TypeS32, Offset(mProbability, AITrigger), AI_NAVCHOICES, "chance of picking this object to path to.");
|
|
||||||
|
|
||||||
Parent::initPersistFields();
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -175,20 +175,5 @@ inline GameBase* Trigger::getObject(const U32 index)
|
||||||
return mObjects[index];
|
return mObjects[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
#define AI_NAVCHOICES 8
|
|
||||||
class AITrigger : public Trigger
|
|
||||||
{
|
|
||||||
typedef Trigger Parent;
|
|
||||||
public:
|
|
||||||
AITrigger();
|
|
||||||
~AITrigger();
|
|
||||||
|
|
||||||
StringTableEntry mWaypoints[AI_NAVCHOICES];
|
|
||||||
S32 mProbability[AI_NAVCHOICES];
|
|
||||||
static void initPersistFields();
|
|
||||||
// SimObject
|
|
||||||
DECLARE_CONOBJECT(AITrigger);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // _H_TRIGGER
|
#endif // _H_TRIGGER
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue