Changeset 10439 in orxonox.OLD for trunk/src/world_entities/npcs
- Timestamp:
- Jan 28, 2007, 1:58:29 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/npcs/npc.cc
r10406 r10439 34 34 #include "debug.h" 35 35 #include "loading/load_param.h" 36 #include "track/track.h" 36 37 37 38 … … 64 65 std::cout << "Swarm Number:" << swarmNumber << "\n"; 65 66 67 //add to track 68 if(this->entityTrack) 69 this->setParent(this->entityTrack->getTrackNode()); 70 else 66 71 AIEngine::getInstance()->addAI(teamNumber,swarmNumber,(WorldEntity*)this,maxSpeed,attackDistance); 67 72 … … 117 122 // this->getWeaponManager().getFixedTarget()->setRelCoor(100000,0,0); 118 123 124 125 126 119 127 } 120 128 … … 122 130 NPC::~NPC () 123 131 { 132 if(! this->entityTrack) 124 133 AIEngine::getInstance()->removeAI(teamNumber,swarmNumber,(WorldEntity*)this); 125 134 } … … 220 229 weaponMan.fire(); 221 230 this->bFire = false; 222 } 231 232 if(this->entityTrack) 233 this->entityTrack->tick(dt); 234 235 }
Note: See TracChangeset
for help on using the changeset viewer.