Changeset 7337 in orxonox.OLD for trunk/src/world_entities/space_ships/helicopter.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/helicopter.cc
r7221 r7337 94 94 this->addWeapon(cannon, 0, 6); 95 95 96 this->getWeaponManager() ->changeWeaponConfig(1);97 dynamic_cast<Element2D*>(this->getWeaponManager() ->getFixedTarget())->setVisibility( false);96 this->getWeaponManager().changeWeaponConfig(1); 97 dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( false); 98 98 } 99 99 … … 161 161 registerEvent(EV_MOUSE_MOTION); 162 162 163 this->getWeaponManager() ->setSlotCount(7);164 165 this->getWeaponManager() ->setSlotPosition(0, Vector(0.0, .1, -1.0));166 this->getWeaponManager() ->setSlotCapability(0, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);167 168 this->getWeaponManager() ->setSlotPosition(1, Vector(0.0, .1, 1.0));169 this->getWeaponManager() ->setSlotCapability(1, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);170 171 this->getWeaponManager() ->setSlotPosition(2, Vector(-1.5, .5, -.5));172 this->getWeaponManager() ->setSlotDirection(2, Quaternion(-M_PI_4*.5, Vector(1,0,0)));173 174 this->getWeaponManager() ->setSlotPosition(3, Vector(-1.5, .5, .5));175 this->getWeaponManager() ->setSlotDirection(3, Quaternion(M_PI_4*.5, Vector(1,0,0)));176 177 this->getWeaponManager() ->setSlotPosition(4, Vector(-1.5, -.5, .5));178 this->getWeaponManager() ->setSlotDirection(4, Quaternion(-M_PI_4*.5+M_PI, Vector(1,0,0)));179 180 this->getWeaponManager() ->setSlotPosition(5, Vector(-1.5, -.5, -.5));181 this->getWeaponManager() ->setSlotDirection(5, Quaternion(+M_PI_4*.5-M_PI, Vector(1,0,0)));182 183 this->getWeaponManager() ->setSlotPosition(6, Vector(-1, 0.0, 0));184 this->getWeaponManager() ->setSlotCapability(6, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);185 186 this->getWeaponManager() ->getFixedTarget()->setParent(&(this->cameraNode));187 this->getWeaponManager() ->getFixedTarget()->setRelCoor(0,0,0);188 189 dynamic_cast<Element2D*>(this->getWeaponManager() ->getFixedTarget())->setVisibility( false);163 this->getWeaponManager().setSlotCount(7); 164 165 this->getWeaponManager().setSlotPosition(0, Vector(0.0, .1, -1.0)); 166 this->getWeaponManager().setSlotCapability(0, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 167 168 this->getWeaponManager().setSlotPosition(1, Vector(0.0, .1, 1.0)); 169 this->getWeaponManager().setSlotCapability(1, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 170 171 this->getWeaponManager().setSlotPosition(2, Vector(-1.5, .5, -.5)); 172 this->getWeaponManager().setSlotDirection(2, Quaternion(-M_PI_4*.5, Vector(1,0,0))); 173 174 this->getWeaponManager().setSlotPosition(3, Vector(-1.5, .5, .5)); 175 this->getWeaponManager().setSlotDirection(3, Quaternion(M_PI_4*.5, Vector(1,0,0))); 176 177 this->getWeaponManager().setSlotPosition(4, Vector(-1.5, -.5, .5)); 178 this->getWeaponManager().setSlotDirection(4, Quaternion(-M_PI_4*.5+M_PI, Vector(1,0,0))); 179 180 this->getWeaponManager().setSlotPosition(5, Vector(-1.5, -.5, -.5)); 181 this->getWeaponManager().setSlotDirection(5, Quaternion(+M_PI_4*.5-M_PI, Vector(1,0,0))); 182 183 this->getWeaponManager().setSlotPosition(6, Vector(-1, 0.0, 0)); 184 this->getWeaponManager().setSlotCapability(6, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 185 186 this->getWeaponManager().getFixedTarget()->setParent(&(this->cameraNode)); 187 this->getWeaponManager().getFixedTarget()->setRelCoor(0,0,0); 188 189 dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( false); 190 190 191 191 } … … 202 202 void Helicopter::enter() 203 203 { 204 dynamic_cast<Element2D*>(this->getWeaponManager() ->getFixedTarget())->setVisibility( true);205 State::getCameraNode()->setParentSoft(this->getWeaponManager() ->getFixedTarget());206 State::getCameraTargetNode()->setParentSoft(this->getWeaponManager() ->getFixedTarget());204 dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( true); 205 State::getCameraNode()->setParentSoft(this->getWeaponManager().getFixedTarget()); 206 State::getCameraTargetNode()->setParentSoft(this->getWeaponManager().getFixedTarget()); 207 207 } 208 208 209 209 void Helicopter::leave() 210 210 { 211 dynamic_cast<Element2D*>(this->getWeaponManager() ->getFixedTarget())->setVisibility( false);211 dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( false); 212 212 this->detachCamera(); 213 213
Note: See TracChangeset
for help on using the changeset viewer.