Changeset 8894 in orxonox.OLD for trunk/src/world_entities/creatures
- Timestamp:
- Jun 29, 2006, 12:19:48 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/creatures/fps_player.cc
r8846 r8894 26 26 #include "weapons/turret.h" 27 27 #include "weapons/cannon.h" 28 #include "weapons/fps_sniper_rifle.h" 28 29 29 30 #include "key_mapper.h" … … 35 36 36 37 CREATE_FACTORY(FPSPlayer, CL_FPS_PLAYER); 38 39 #include "script_class.h" 40 CREATE_SCRIPTABLE_CLASS(FPSPlayer, CL_FPS_PLAYER, 41 addMethod("setAbsCoor", ExecutorLua3<PNode,float,float,float>(&PNode::setAbsCoor)) 42 ->addMethod("getAbsCoorX", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorX)) 43 ->addMethod("getAbsCoorY", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorY)) 44 ->addMethod("getAbsCoorZ", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorZ)) 45 ); 37 46 38 47 … … 101 110 dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( false); 102 111 103 Weapon* wpRight = new TestGun(0);112 Weapon* wpRight = new FPSSniperRifle(0); 104 113 wpRight->setName("testGun Right"); 105 Weapon* wpLeft = new TestGun(1); 114 /* Weapon* wpLeft = new TestGun(1);*/ 106 115 // Weapon* wpLeft = new Turret(); 107 wpLeft->setName("testGun Left");108 109 this->addWeapon(wpLeft, 1, 0);110 this->addWeapon(wpRight,1 ,1);116 // wpLeft->setName("testGun Left"); 117 118 // this->addWeapon(wpLeft, 1, 0); 119 this->addWeapon(wpRight,1, 0); 111 120 this->getWeaponManager().changeWeaponConfig(1); 112 121 113 122 this->getWeaponManager().setSlotCount(2); 114 this->getWeaponManager().setSlotPosition(0, Vector(-0.5, .2, -1.9)); 123 this->getWeaponManager().setSlotPosition(0, Vector(0.0, 5.0, 0.0)); 124 this->getWeaponManager().setSlotDirection(1, Quaternion(M_PI_4*.5, Vector(0,1,0))); 115 125 this->getWeaponManager().setSlotCapability(0, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 116 126 this->getWeaponManager().setSlotPosition(1, Vector(-0.5, .2, 1.9));
Note: See TracChangeset
for help on using the changeset viewer.