Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 19, 2006, 12:24:20 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: simple useless stuff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/space_ships/helicopter.cc

    r7221 r7337  
    9494  this->addWeapon(cannon, 0, 6);
    9595
    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);
    9898}
    9999
     
    161161  registerEvent(EV_MOUSE_MOTION);
    162162
    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);
    190190
    191191}
     
    202202void Helicopter::enter()
    203203{
    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());
    207207}
    208208
    209209void Helicopter::leave()
    210210{
    211   dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( false);
     211  dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( false);
    212212  this->detachCamera();
    213213
Note: See TracChangeset for help on using the changeset viewer.