Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 19, 2006, 11:38:01 PM (17 years ago)
Author:
tfahrni
Message:

many AI changes but nothing new

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ai/src/world_entities/npcs/npc_test.cc

    r10071 r10112  
    3232
    3333#include "class_id_DEPRECATED.h"
     34#include "movement_module.h"
     35#include "ai_module.h"
     36
    3437
    3538ObjectListDefinitionID(NPC2, CL_NPC_TEST2);
     
    3942NPC2::NPC2(const TiXmlElement* root) : NPC(NULL)
    4043{
    41   this->registerObject(this, NPC2::_objectList);
    42 
    43   if (root != NULL)this->loadParams(root);
    44 
    45   addToTeam(0);
     44        this->registerObject(this, NPC2::_objectList);
     45        if (root != NULL)this->loadParams(root);
     46       
     47        this->aiModule=new MovementModule(this);
    4648}
    4749
     
    6062void NPC2::tick(float dt)
    6163{
    62   // animating the md2 model
     64        // animating the md2 model
    6365        if( likely(this->getModel(0) != NULL) && this->getModel(0)->isA(MD2Model::staticClassID()))
    64     ((MD2Model*)this->getModel(0))->tick(dt);
     66                ((MD2Model*)this->getModel(0))->tick(dt);
     67
     68        // processing AI
     69        //PRINTF(0)("Processing NPC\n");
     70        if(this->aiModule!=NULL)this->aiModule->process(dt);
    6571}
    6672
Note: See TracChangeset for help on using the changeset viewer.