Changeset 7337 in orxonox.OLD for trunk/src/world_entities/space_ships/hover.cc
- Timestamp:
- Apr 19, 2006, 12:24:20 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/space_ships/hover.cc
r7327 r7337 86 86 this->addWeapon(cannon, 0, 2); 87 87 88 this->getWeaponManager() ->changeWeaponConfig(1);89 dynamic_cast<Element2D*>(this->getWeaponManager() ->getFixedTarget())->setVisibility( false);88 this->getWeaponManager().changeWeaponConfig(1); 89 dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( false); 90 90 91 91 this->loadModel("models/ships/hoverglider_mainbody.obj"); … … 138 138 this->rotorNodeRight.setRelCoor(0, 1.0, 2.3); 139 139 140 dynamic_cast<Element2D*>(this->getWeaponManager() ->getFixedTarget())->setVisibility( false);140 dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( false); 141 141 142 142 … … 155 155 156 156 // WEAPON_MANAGER configuration 157 this->getWeaponManager() ->setSlotCount(5);158 159 this->getWeaponManager() ->setSlotPosition(0, Vector(-0.28, 1.186, -2.750), &this->wingNodeLeft);160 this->getWeaponManager() ->setSlotCapability(0, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);161 162 this->getWeaponManager() ->setSlotPosition(1, Vector(-0.28, 1.186, 2.750), &this->wingNodeRight);163 this->getWeaponManager() ->setSlotCapability(1, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);164 165 this->getWeaponManager() ->setSlotPosition(2, Vector(-1.63, .809, -.003));166 this->getWeaponManager() ->setSlotCapability(2, WTYPE_HEAVY);157 this->getWeaponManager().setSlotCount(5); 158 159 this->getWeaponManager().setSlotPosition(0, Vector(-0.28, 1.186, -2.750), &this->wingNodeLeft); 160 this->getWeaponManager().setSlotCapability(0, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 161 162 this->getWeaponManager().setSlotPosition(1, Vector(-0.28, 1.186, 2.750), &this->wingNodeRight); 163 this->getWeaponManager().setSlotCapability(1, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 164 165 this->getWeaponManager().setSlotPosition(2, Vector(-1.63, .809, -.003)); 166 this->getWeaponManager().setSlotCapability(2, WTYPE_HEAVY); 167 167 168 168 /// TODO: THESE ARE TOO MUCH 169 this->getWeaponManager() ->setSlotPosition(3, Vector(-1.63, .678, -.652));170 this->getWeaponManager() ->setSlotDirection(3, Quaternion(-24/180 * M_PI, Vector(1,0,0)));171 172 this->getWeaponManager() ->setSlotPosition(4, Vector(-1.63, .678, .652));173 this->getWeaponManager() ->setSlotDirection(4, Quaternion(24/180 * M_PI, Vector(1,0,0)));169 this->getWeaponManager().setSlotPosition(3, Vector(-1.63, .678, -.652)); 170 this->getWeaponManager().setSlotDirection(3, Quaternion(-24/180 * M_PI, Vector(1,0,0))); 171 172 this->getWeaponManager().setSlotPosition(4, Vector(-1.63, .678, .652)); 173 this->getWeaponManager().setSlotDirection(4, Quaternion(24/180 * M_PI, Vector(1,0,0))); 174 174 175 175 this->cameraNode.setRelCoor(1,5,0); 176 this->getWeaponManager() ->getFixedTarget()->setParent(&this->cameraNode);177 this->getWeaponManager() ->getFixedTarget()->setRelCoor(1000,0,0);176 this->getWeaponManager().getFixedTarget()->setParent(&this->cameraNode); 177 this->getWeaponManager().getFixedTarget()->setRelCoor(1000,0,0); 178 178 } 179 179 … … 190 190 void Hover::enter() 191 191 { 192 dynamic_cast<Element2D*>(this->getWeaponManager() ->getFixedTarget())->setVisibility( true);192 dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( true); 193 193 194 194 State::getCameraNode()->setParentSoft(&this->cameraNode); … … 199 199 void Hover::leave() 200 200 { 201 dynamic_cast<Element2D*>(this->getWeaponManager() ->getFixedTarget())->setVisibility( false);201 dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( false); 202 202 this->detachCamera(); 203 203
Note: See TracChangeset
for help on using the changeset viewer.