Changeset 9869 in orxonox.OLD for trunk/src/world_entities/creatures
- Timestamp:
- Oct 3, 2006, 12:19:30 AM (18 years ago)
- Location:
- trunk/src/world_entities/creatures
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/creatures/fps_player.cc
r9494 r9869 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_DEPRECATED.h" 44 ObjectListDefinitionID(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 addMethod("setAbsCoor", ExecutorLua3<PNode,float,float,float>(&PNode::setAbsCoor))49 ->addMethod("getAbsCoorX", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorX))50 ->addMethod("getAbsCoorY", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorY))51 ->addMethod("getAbsCoorZ", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorZ))48 CREATE_SCRIPTABLE_CLASS(FPSPlayer, 49 addMethod("setAbsCoor", Executor3<PNode, lua_State*,float,float,float>(&PNode::setAbsCoor)) 50 ->addMethod("getAbsCoorX", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorX)) 51 ->addMethod("getAbsCoorY", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorY)) 52 ->addMethod("getAbsCoorZ", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorZ)) 52 53 ); 53 54 … … 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::staticClassID()); 169 170 170 171 this->initWeapon = false; -
trunk/src/world_entities/creatures/fps_player.h
r9235 r9869 16 16 class FPSPlayer : public Playable 17 17 { 18 ObjectListDeclaration(FPSPlayer); 18 19 19 20 public: -
trunk/src/world_entities/creatures/md2_creature.cc
r8724 r9869 22 22 #include "objModel.h" 23 23 #include "md2/md2Model.h" 24 #include "util/loading/resource_manager.h"25 24 #include "state.h" 26 25 … … 37 36 #include "debug.h" 38 37 39 CREATE_FACTORY(MD2Creature, CL_MD2_CREATURE); 38 #include "class_id_DEPRECATED.h" 39 ObjectListDefinitionID(MD2Creature, CL_MD2_CREATURE); 40 CREATE_FACTORY(MD2Creature); 40 41 41 42 /** … … 86 87 PRINTF(4)("MD2CREATURE INIT\n"); 87 88 // this->setRelDir(Quaternion(M_PI, Vector(1,0,0))); 88 this-> setClassID(CL_MD2_CREATURE, "MD2Creature");89 this->registerObject(this, MD2Creature::_objectList); 89 90 90 91 this->toList(OM_GROUP_01); … … 95 96 Weapon* wpLeft = new TestGun(1); 96 97 wpLeft->setName("testGun Left"); 97 Weapon* cannon = dynamic_cast<Weapon*>(Factory::fabricate( CL_CANNON));98 Weapon* cannon = dynamic_cast<Weapon*>(Factory::fabricate("Cannon")); 98 99 99 100 cannon->setName("BFG"); … … 112 113 this->cameraConnNode.addChild(State::getCameraNode()); 113 114 State::getCameraTargetNode()->setRelCoor(10,0,0); 114 115 115 116 116 117 -
trunk/src/world_entities/creatures/md2_creature.h
r8724 r9869 16 16 class MD2Creature : public Playable 17 17 { 18 ObjectListDeclaration(MD2Creature); 18 19 19 20 public:
Note: See TracChangeset
for help on using the changeset viewer.