Changeset 9709 in orxonox.OLD for branches/new_class_id/src/world_entities/creatures
- Timestamp:
- Aug 31, 2006, 10:51:08 PM (18 years ago)
- Location:
- branches/new_class_id/src/world_entities/creatures
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/world_entities/creatures/fps_player.cc
r9494 r9709 32 32 33 33 #include "aabb.h" 34 34 #include "bsp_entity.h" 35 35 36 36 #include "key_mapper.h" … … 41 41 42 42 43 44 CREATE_FACTORY(FPSPlayer, CL_FPS_PLAYER); 43 #include "class_id.h" 44 NewObjectListDefinitionID(FPSPlayer, CL_FPS_PLAYER); 45 CREATE_FACTORY(FPSPlayer); 45 46 46 47 #include "script_class.h" 47 CREATE_SCRIPTABLE_CLASS(FPSPlayer, CL_FPS_PLAYER,48 CREATE_SCRIPTABLE_CLASS(FPSPlayer, FPSPlayer::classID(), 48 49 addMethod("setAbsCoor", ExecutorLua3<PNode,float,float,float>(&PNode::setAbsCoor)) 49 50 ->addMethod("getAbsCoorX", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorX)) … … 85 86 void FPSPlayer::init() 86 87 { 87 this-> setClassID(CL_FPS_PLAYER, "FPSPlayer");88 this->registerObject(this, FPSPlayer::_objectList); 88 89 89 90 this->bLeft = false; … … 166 167 167 168 //subscribe to collision reaction 168 this->subscribeReaction(CREngine::CR_PHYSICS_FULL_WALK, CL_BSP_ENTITY);169 this->subscribeReaction(CREngine::CR_PHYSICS_FULL_WALK, BspEntity::classID()); 169 170 170 171 this->initWeapon = false; -
branches/new_class_id/src/world_entities/creatures/fps_player.h
r9235 r9709 16 16 class FPSPlayer : public Playable 17 17 { 18 NewObjectListDeclaration(FPSPlayer); 18 19 19 20 public: -
branches/new_class_id/src/world_entities/creatures/md2_creature.cc
r8724 r9709 37 37 #include "debug.h" 38 38 39 CREATE_FACTORY(MD2Creature, CL_MD2_CREATURE); 39 #include "class_id.h" 40 NewObjectListDefinitionID(MD2Creature, CL_MD2_CREATURE); 41 CREATE_FACTORY(MD2Creature); 40 42 41 43 /** … … 86 88 PRINTF(4)("MD2CREATURE INIT\n"); 87 89 // this->setRelDir(Quaternion(M_PI, Vector(1,0,0))); 88 this-> setClassID(CL_MD2_CREATURE, "MD2Creature");90 this->registerObject(this, MD2Creature::_objectList); 89 91 90 92 this->toList(OM_GROUP_01); … … 95 97 Weapon* wpLeft = new TestGun(1); 96 98 wpLeft->setName("testGun Left"); 97 Weapon* cannon = dynamic_cast<Weapon*>(Factory::fabricate( CL_CANNON));99 Weapon* cannon = dynamic_cast<Weapon*>(Factory::fabricate("Cannon")); 98 100 99 101 cannon->setName("BFG"); … … 112 114 this->cameraConnNode.addChild(State::getCameraNode()); 113 115 State::getCameraTargetNode()->setRelCoor(10,0,0); 114 116 115 117 116 118 -
branches/new_class_id/src/world_entities/creatures/md2_creature.h
r8724 r9709 16 16 class MD2Creature : public Playable 17 17 { 18 NewObjectListDeclaration(MD2Creature); 18 19 19 20 public:
Note: See TracChangeset
for help on using the changeset viewer.