Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 5, 2006, 10:53:55 AM (18 years ago)
Author:
patrick
Message:

world entity

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/world_entities/creatures/fps_player.cc

    r9194 r9207  
    135135
    136136  this->getWeaponManager().setSlotCount(2);
    137 //   this->getWeaponManager().setSlotDirection(0, Quaternion(M_PI_2, Vector(0,1,0)));
     137  this->getWeaponManager().setSlotDirection(0, Quaternion(M_PI_4*-0.55f, Vector(0,0,1)));
    138138  this->getWeaponManager().setSlotCapability(0, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
    139139  this->getWeaponManager().setSlotDirection(1, Quaternion(M_PI_4*.5, Vector(1,0,0)));
     
    141141  this->getWeaponManager().setSlotPosition(1, Vector(5.0, 0.0, 0.0));
    142142
     143//   this->getWeaponManager().getFixedTarget()->setRelDir(Quaternion(M_PI_4*-0.6f, Vector(0,0,1)));
     144
    143145
    144146  this->getWeaponManager().setParentNode(&this->cameraNode);
     
    149151
    150152  this->aimingSystem = new AimingSystem(this);
    151   this->addChild(this->aimingSystem);
    152 
     153  //this->addChild(this->aimingSystem);
     154  wpRight->addChild(this->aimingSystem);
     155//   this->getWeaponManager().sl
    153156
    154157
     
    233236    this->initWeapon = true;
    234237
    235     State::getCameraNode()->setParentMode(PNODE_ROTATE_AND_MOVE);
     238    this->cameraNode.setParentMode(PNODE_ROTATE_AND_MOVE);
    236239
    237240    this->getWeaponManager().getParentNode()->setParentMode(PNODE_ROTATE_AND_MOVE);
     
    242245    this->aimingSystem->toList(OM_GROUP_01);
    243246    this->aimingSystem->setParent(&this->cameraNode);
    244     this->aimingSystem->setParentMode(PNODE_ROTATE_AND_MOVE);
     247//     this->aimingSystem->setParentMode(PNODE_ROTATE_AND_MOVE);
     248    this->aimingSystem->setRelDir(Quaternion(M_PI_4*-0.55f, Vector(0,0,1)));
     249    this->aimingSystem->setRelCoor(0, -1, -1);
    245250
    246251
     
    248253    if( box != NULL)
    249254    {
    250       float f = 1.3f;
    251       State::getCameraNode()->setRelCoor(0, box->halfLength[1] * f, 0);
    252       State::getCameraTargetNode()->setRelCoor(10, box->halfLength[1] * f, 0);
    253 
    254       this->getWeaponManager().setSlotPosition(0, Vector(1.5, box->halfLength[1] * f - 0.7, 1.1));
     255      float f = 0.2f;
     256      this->cameraNode.setRelCoor(0, box->halfLength[1] * f, 0);
     257      this->cameraNode.setRelCoor(10, box->halfLength[1] * f, 0);
     258
     259      this->getWeaponManager().setSlotPosition(0, Vector(-8.0, box->halfLength[1] * f - 1.5, 1.1));
    255260      this->getWeaponManager().setSlotPosition(1, Vector(5.0, box->halfLength[1] * f, 0.0));
    256261    }
     
    266271  if( this->bFire)
    267272  {
    268     //this->getWeaponManager().fire();
     273    this->getWeaponManager().fire();
    269274
    270275    WorldEntity* target = this->aimingSystem->getNearestTarget();
     
    291296
    292297
    293     if ( attitude > 0.32 )
    294       attitude = 0.32;
    295 
    296     else if ( attitude < -2.1 )
    297       attitude = -2.1;
     298    if ( attitude > 1.95 )
     299      attitude = 1.95;
     300    else if ( attitude < -1.07 )
     301      attitude = -1.07;
    298302
    299303    xMouse = yMouse = 0;
Note: See TracChangeset for help on using the changeset viewer.