Changeset 7337 in orxonox.OLD for trunk/src/world_entities/space_ships/space_ship.cc
- Timestamp:
- Apr 19, 2006, 12:24:20 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/space_ships/space_ship.cc
r7221 r7337 136 136 //this->addWeapon(cannon, 0, 6); 137 137 138 this->getWeaponManager() ->changeWeaponConfig(1);138 this->getWeaponManager().changeWeaponConfig(1); 139 139 140 140 bUp = bDown = bLeft = bRight = bAscend = bDescend = bRollL = bRollR = false; … … 183 183 registerEvent(EV_MOUSE_MOTION); 184 184 185 this->getWeaponManager() ->setSlotCount(7);186 187 this->getWeaponManager() ->setSlotPosition(0, Vector(-2.6, .1, -3.0));188 this->getWeaponManager() ->setSlotCapability(0, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);189 190 this->getWeaponManager() ->setSlotPosition(1, Vector(-2.6, .1, 3.0));191 this->getWeaponManager() ->setSlotCapability(1, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);192 193 this->getWeaponManager() ->setSlotPosition(2, Vector(-1.5, .5, -.5));194 this->getWeaponManager() ->setSlotDirection(2, Quaternion(-M_PI_4*.5, Vector(1,0,0)));195 196 this->getWeaponManager() ->setSlotPosition(3, Vector(-1.5, .5, .5));197 this->getWeaponManager() ->setSlotDirection(3, Quaternion(M_PI_4*.5, Vector(1,0,0)));198 199 this->getWeaponManager() ->setSlotPosition(4, Vector(-1.5, -.5, .5));200 this->getWeaponManager() ->setSlotDirection(4, Quaternion(-M_PI_4*.5+M_PI, Vector(1,0,0)));201 202 this->getWeaponManager() ->setSlotPosition(5, Vector(-1.5, -.5, -.5));203 this->getWeaponManager() ->setSlotDirection(5, Quaternion(+M_PI_4*.5-M_PI, Vector(1,0,0)));185 this->getWeaponManager().setSlotCount(7); 186 187 this->getWeaponManager().setSlotPosition(0, Vector(-2.6, .1, -3.0)); 188 this->getWeaponManager().setSlotCapability(0, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 189 190 this->getWeaponManager().setSlotPosition(1, Vector(-2.6, .1, 3.0)); 191 this->getWeaponManager().setSlotCapability(1, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 192 193 this->getWeaponManager().setSlotPosition(2, Vector(-1.5, .5, -.5)); 194 this->getWeaponManager().setSlotDirection(2, Quaternion(-M_PI_4*.5, Vector(1,0,0))); 195 196 this->getWeaponManager().setSlotPosition(3, Vector(-1.5, .5, .5)); 197 this->getWeaponManager().setSlotDirection(3, Quaternion(M_PI_4*.5, Vector(1,0,0))); 198 199 this->getWeaponManager().setSlotPosition(4, Vector(-1.5, -.5, .5)); 200 this->getWeaponManager().setSlotDirection(4, Quaternion(-M_PI_4*.5+M_PI, Vector(1,0,0))); 201 202 this->getWeaponManager().setSlotPosition(5, Vector(-1.5, -.5, -.5)); 203 this->getWeaponManager().setSlotDirection(5, Quaternion(+M_PI_4*.5-M_PI, Vector(1,0,0))); 204 204 // 205 this->getWeaponManager() ->setSlotPosition(6, Vector(-1, 0.0, 0));206 this->getWeaponManager() ->setSlotCapability(6, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);205 this->getWeaponManager().setSlotPosition(6, Vector(-1, 0.0, 0)); 206 this->getWeaponManager().setSlotCapability(6, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 207 207 // 208 // this->getWeaponManager() ->setSlotPosition(8, Vector(-2.5, -0.3, -2.0));209 // this->getWeaponManager() ->setSlotDirection(8, Quaternion(-M_PI, Vector(1,0,0)));208 // this->getWeaponManager().setSlotPosition(8, Vector(-2.5, -0.3, -2.0)); 209 // this->getWeaponManager().setSlotDirection(8, Quaternion(-M_PI, Vector(1,0,0))); 210 210 // 211 // this->getWeaponManager() ->setSlotPosition(9, Vector(-2.5, -0.3, 2.0));212 // this->getWeaponManager() ->setSlotDirection(9, Quaternion(+M_PI, Vector(1,0,0)));:213 214 this->getWeaponManager() ->getFixedTarget()->setParent(this);215 this->getWeaponManager() ->getFixedTarget()->setRelCoor(100000,0,0);216 217 dynamic_cast<Element2D*>(this->getWeaponManager() ->getFixedTarget())->setVisibility( false);211 // this->getWeaponManager().setSlotPosition(9, Vector(-2.5, -0.3, 2.0)); 212 // this->getWeaponManager().setSlotDirection(9, Quaternion(+M_PI, Vector(1,0,0)));: 213 214 this->getWeaponManager().getFixedTarget()->setParent(this); 215 this->getWeaponManager().getFixedTarget()->setRelCoor(100000,0,0); 216 217 dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( false); 218 218 219 219 this->burstEmitter = new DotEmitter(200, 0.0, .01); … … 248 248 } 249 249 250 void SpaceShip::set AbsDirPlay(const Quaternion& quat)250 void SpaceShip::setStartDirection(const Quaternion& quat) 251 251 { 252 252 this->mouseDir = quat; … … 267 267 void SpaceShip::enter() 268 268 { 269 dynamic_cast<Element2D*>(this->getWeaponManager() ->getFixedTarget())->setVisibility( true);269 dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( true); 270 270 this->attachCamera(); 271 271 } … … 273 273 void SpaceShip::leave() 274 274 { 275 dynamic_cast<Element2D*>(this->getWeaponManager() ->getFixedTarget())->setVisibility( false);275 dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( false); 276 276 this->detachCamera(); 277 277 } … … 320 320 { 321 321 WorldEntity::draw(); 322 this->getWeaponManager()->draw();323 322 324 323 //this->debug(0);
Note: See TracChangeset
for help on using the changeset viewer.