Changeset 7337 in orxonox.OLD for trunk/src/world_entities/creatures
- Timestamp:
- Apr 19, 2006, 12:24:20 AM (19 years ago)
- Location:
- trunk/src/world_entities/creatures
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/creatures/md2_creature.cc
r7221 r7337 88 88 cannon->setName("BFG"); 89 89 90 this->getWeaponManager() ->addWeapon(wpLeft, 1, 0);91 this->getWeaponManager() ->addWeapon(wpRight,1 ,1);92 // this->getWeaponManager() ->addWeapon(cannon, 0, 6);93 94 //this->getWeaponManager() ->addWeapon(turret, 3, 0);95 96 this->getWeaponManager() ->changeWeaponConfig(0);90 this->getWeaponManager().addWeapon(wpLeft, 1, 0); 91 this->getWeaponManager().addWeapon(wpRight,1 ,1); 92 // this->getWeaponManager().addWeapon(cannon, 0, 6); 93 94 //this->getWeaponManager().addWeapon(turret, 3, 0); 95 96 this->getWeaponManager().changeWeaponConfig(0); 97 97 } 98 98 … … 147 147 148 148 149 this->getWeaponManager() ->setSlotCount(7);150 151 this->getWeaponManager() ->setSlotPosition(0, Vector(-0.5, .2, -1.9));152 this->getWeaponManager() ->setSlotCapability(0, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);153 154 this->getWeaponManager() ->setSlotPosition(1, Vector(-0.5, .2, 1.9));155 this->getWeaponManager() ->setSlotCapability(1, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);156 157 this->getWeaponManager() ->setSlotPosition(2, Vector(-1.5, .5, -.5));158 this->getWeaponManager() ->setSlotDirection(2, Quaternion(-M_PI_4*.5, Vector(1,0,0)));159 160 this->getWeaponManager() ->setSlotPosition(3, Vector(-1.5, .5, .5));161 this->getWeaponManager() ->setSlotDirection(3, Quaternion(M_PI_4*.5, Vector(1,0,0)));162 163 this->getWeaponManager() ->setSlotPosition(4, Vector(-1.5, -.5, .5));164 this->getWeaponManager() ->setSlotDirection(4, Quaternion(-M_PI_4*.5+M_PI, Vector(1,0,0)));165 166 this->getWeaponManager() ->setSlotPosition(5, Vector(-1.5, -.5, -.5));167 this->getWeaponManager() ->setSlotDirection(5, Quaternion(+M_PI_4*.5-M_PI, Vector(1,0,0)));149 this->getWeaponManager().setSlotCount(7); 150 151 this->getWeaponManager().setSlotPosition(0, Vector(-0.5, .2, -1.9)); 152 this->getWeaponManager().setSlotCapability(0, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 153 154 this->getWeaponManager().setSlotPosition(1, Vector(-0.5, .2, 1.9)); 155 this->getWeaponManager().setSlotCapability(1, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 156 157 this->getWeaponManager().setSlotPosition(2, Vector(-1.5, .5, -.5)); 158 this->getWeaponManager().setSlotDirection(2, Quaternion(-M_PI_4*.5, Vector(1,0,0))); 159 160 this->getWeaponManager().setSlotPosition(3, Vector(-1.5, .5, .5)); 161 this->getWeaponManager().setSlotDirection(3, Quaternion(M_PI_4*.5, Vector(1,0,0))); 162 163 this->getWeaponManager().setSlotPosition(4, Vector(-1.5, -.5, .5)); 164 this->getWeaponManager().setSlotDirection(4, Quaternion(-M_PI_4*.5+M_PI, Vector(1,0,0))); 165 166 this->getWeaponManager().setSlotPosition(5, Vector(-1.5, -.5, -.5)); 167 this->getWeaponManager().setSlotDirection(5, Quaternion(+M_PI_4*.5-M_PI, Vector(1,0,0))); 168 168 // 169 this->getWeaponManager() ->setSlotPosition(6, Vector(-1, 0.0, 0));170 this->getWeaponManager() ->setSlotCapability(6, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);169 this->getWeaponManager().setSlotPosition(6, Vector(-1, 0.0, 0)); 170 this->getWeaponManager().setSlotCapability(6, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 171 171 // 172 172 173 this->cameraConnNode.addChild(this->getWeaponManager() ->getFixedTarget());174 dynamic_cast<Element2D*>(this->getWeaponManager() ->getFixedTarget())->setVisibility( false);175 176 this->getWeaponManager() ->getFixedTarget()->setRelCoor(10,0,0);173 this->cameraConnNode.addChild(this->getWeaponManager().getFixedTarget()); 174 dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( false); 175 176 this->getWeaponManager().getFixedTarget()->setRelCoor(10,0,0); 177 177 178 178 } … … 181 181 void MD2Creature::enter() 182 182 { 183 dynamic_cast<Element2D*>(this->getWeaponManager() ->getFixedTarget())->setVisibility( true);183 dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( true); 184 184 this->attachCamera(); 185 185 … … 188 188 void MD2Creature::leave() 189 189 { 190 dynamic_cast<Element2D*>(this->getWeaponManager() ->getFixedTarget())->setVisibility( false);190 dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( false); 191 191 192 192 -
trunk/src/world_entities/creatures/md2_creature.h
r7221 r7337 24 24 25 25 virtual void loadParams(const TiXmlElement* root); 26 virtual void set AbsDirPlay(const Quaternion& rot) {/* FIXME */};26 virtual void setStartDirection(const Quaternion& rot) {/* FIXME */}; 27 27 28 28 virtual void enter();
Note: See TracChangeset
for help on using the changeset viewer.