Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10439 in orxonox.OLD for trunk/src/world_entities/npcs/npc.cc


Ignore:
Timestamp:
Jan 28, 2007, 1:58:29 PM (17 years ago)
Author:
snellen
Message:

npc is now trackable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/npcs/npc.cc

    r10406 r10439  
    3434#include "debug.h"
    3535#include "loading/load_param.h"
     36#include "track/track.h"
    3637
    3738
     
    6465  std::cout << "Swarm Number:" << swarmNumber << "\n";
    6566
     67//add to track
     68  if(this->entityTrack)
     69    this->setParent(this->entityTrack->getTrackNode());
     70  else
    6671  AIEngine::getInstance()->addAI(teamNumber,swarmNumber,(WorldEntity*)this,maxSpeed,attackDistance);
    6772
     
    117122//   this->getWeaponManager().getFixedTarget()->setRelCoor(100000,0,0);
    118123
     124
     125 
     126
    119127}
    120128
     
    122130NPC::~NPC ()
    123131{
     132 if(! this->entityTrack)
    124133  AIEngine::getInstance()->removeAI(teamNumber,swarmNumber,(WorldEntity*)this);
    125134}
     
    220229    weaponMan.fire();
    221230  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.