Changeset 10545 in orxonox.OLD for trunk/src/world_entities/npcs
- Timestamp:
- Jan 31, 2007, 5:39:05 AM (18 years ago)
- Location:
- trunk/src/world_entities/npcs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/npcs/npc.cc
r10542 r10545 73 73 ->addMethod("setAI", Executor1<NPC, lua_State*, bool>(&NPC::setAI)) 74 74 ->addMethod("setVisibility", Executor1<WorldEntity, lua_State*, bool>(&WorldEntity::setVisibility)) 75 ->addMethod("destroy", Executor0<NPC, lua_State*/*, WorldEntity**/>(&NPC::destroy ))75 ->addMethod("destroy", Executor0<NPC, lua_State*/*, WorldEntity**/>(&NPC::destroyThis)) 76 76 ); 77 77 … … 81 81 this->registerObject(this, NPC::_objectList); 82 82 83 this->toList(OM_GROUP_0 1);83 this->toList(OM_GROUP_00); 84 84 this->bAIEnabled = false; 85 85 … … 262 262 } 263 263 264 void NPC::destroy( /*WorldEntity* killer*/)264 void NPC::destroy( WorldEntity* killer ) 265 265 { 266 266 … … 314 314 //} 315 315 316 this->toList(OM_NULL); 317 this->setAI( false); 318 this->setAbsCoor(-10000,-10000,-10000); 319 320 316 321 } 317 322 … … 430 435 void NPC::hit( float damage, WorldEntity* killer) 431 436 { 437 this->destroy( killer); 432 438 this->setDamage(killer->getDamage()); 433 439 } -
trunk/src/world_entities/npcs/npc.h
r10539 r10545 35 35 void setAI(bool activate); 36 36 inline void enableAI(int flag) { this->bAIEnabled = (bool)flag; } 37 void destroy( /*WorldEntity* killer*/);37 void destroy( WorldEntity* killer ); 38 38 39 39 void hit( float damage, WorldEntity* killer); 40 41 inline void destroyThis() { this->destroy(NULL);}; 40 42 41 43 private:
Note: See TracChangeset
for help on using the changeset viewer.