Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10513 in orxonox.OLD for trunk/src/ai


Ignore:
Timestamp:
Jan 30, 2007, 8:12:15 PM (18 years ago)
Author:
patrick
Message:

ai segfault fixed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ai/ai_engine.h

    r10376 r10513  
    77
    88
    9 class AIEngine{
    10  public:
    11         ~AIEngine(){}
     9class AIEngine
     10{
     11public:
     12  ~AIEngine() { singletonRef = NULL; }
    1213
    13    static AIEngine* getInstance() { if( singletonRef == NULL) singletonRef = new AIEngine(); return singletonRef; }
     14  static AIEngine* getInstance() { if( singletonRef == NULL) singletonRef = new AIEngine(); return singletonRef; }
    1415
    15    void tick(float dt);
    16         void addAI(int teamNumber, int swarmNumber, WorldEntity* npc, float maxSpeed, float attackDistance);
    17         void removeAI(int teamNumber, int swarmNumber, WorldEntity* npc);
     16  void tick(float dt);
     17  void addAI(int teamNumber, int swarmNumber, WorldEntity* npc, float maxSpeed, float attackDistance);
     18  void removeAI(int teamNumber, int swarmNumber, WorldEntity* npc);
    1819
    19  private:
    20         AIEngine(){}
    21         static AIEngine* singletonRef;
    22         std::map<int,AITeam*> teams;
     20private:
     21  AIEngine()
     22{}
     23  static AIEngine* singletonRef;
     24  std::map<int,AITeam*> teams;
    2325};
    2426
Note: See TracChangeset for help on using the changeset viewer.