/* orxonox - the future of 3D-vertical-scrollers Copyright (C) 2004 orx This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ### File Specific: main-programmer: Patrick Boenzli co-programmer: */ #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY #include "npc_test.h" #include "state.h" #include "debug.h" #include "loading/factory.h" #include "loading/load_param.h" #include "md2/md2Model.h" #include "player.h" #include "playable.h" #include "class_id_DEPRECATED.h" #include "movement_module.h" #include "ai_module.h" ObjectListDefinitionID(NPC2, CL_NPC_TEST2); CREATE_FACTORY(NPC2); NPC2::NPC2(const TiXmlElement* root) : NPC(NULL) { this->registerObject(this, NPC2::_objectList); if (root != NULL)this->loadParams(root); this->aiModule=new MovementModule(this); } NPC2::~NPC2 () {} void NPC2::loadParams(const TiXmlElement* root) { NPC::loadParams(root); } void NPC2::tick(float dt) { // animating the md2 model if( likely(this->getModel(0) != NULL) && this->getModel(0)->isA(MD2Model::staticClassID())) ((MD2Model*)this->getModel(0))->tick(dt); // processing AI //PRINTF(0)("Processing NPC\n"); if(this->aiModule!=NULL)this->aiModule->process(dt); }