Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10728 in orxonox.OLD for branches/presentation/src/world_entities


Ignore:
Timestamp:
Jun 20, 2007, 11:39:18 AM (17 years ago)
Author:
nicolasc
Message:

data bump

Location:
branches/presentation/src/world_entities
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/world_entities/projectiles/nadion_blast.cc

    r10722 r10728  
    213213  float matrix[4][4];
    214214  glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
    215   glRotatef(this->angle, 1.0f, 0.0f, 0.0f); //spinning missile
    216 //   glRotatef(this->angle, this->flightDirection.x, this->flightDirection.y, this->flightDirection.z);
     215//   glRotatef(this->angle, 1.0f, 0.0f, 0.0f); //spinning missile
     216// HACK, need to be removed, once the AbsDir is correct, replace with the one above
     217  glRotatef(this->angle, this->flightDirection.x, this->flightDirection.y, this->flightDirection.z);
    217218  this->getAbsDir().matrix (matrix);
    218219  glMultMatrixf((float*)matrix);
  • branches/presentation/src/world_entities/space_ships/space_ship.cc

    r10721 r10728  
    453453{
    454454
    455 //   if( !this->bInit)
    456 //   {
    457 //     // now get slots from the mount points
    458 //     std::map<int, MountPoint*>::iterator it = this->mountPointMap.begin();
    459 //     for( ;it != this->mountPointMap.end(); it++)
    460 //     {
    461 //       WeaponSlot* ws = dynamic_cast<WeaponSlot*>((*it).second->getMount());
    462 //       if( ws != NULL && ws->isA(WeaponSlot::staticClassID()))
    463 //       {
    464 //         int slot = ws->getWeaponSlot();
    465 // //         int side = ws->getWeaponSide(); //FIXME / REMOVE: is not used// HACK needed for some weapons (left/right)
    466 //         this->getWeaponManager().setSlotPosition(slot, (*it).second->getCenter());
    467 //         this->getWeaponManager().setSlotDirection(slot, ws->getRelDir());
    468 // //         PRINTF(0)("setting slot %i\n", slot);
    469 // //         (*it).second->getCenter().debug();
    470 //       }
    471 //     }
    472 //   this->bInit = true;
    473 //   }
     455  if( !this->bInit)
     456  {
     457    // now get slots from the mount points
     458    std::map<int, MountPoint*>::iterator it = this->mountPointMap.begin();
     459    for( ;it != this->mountPointMap.end(); it++)
     460    {
     461      WeaponSlot* ws = dynamic_cast<WeaponSlot*>((*it).second->getMount());
     462      if( ws != NULL && ws->isA(WeaponSlot::staticClassID()))
     463      {
     464        int slot = ws->getWeaponSlot();
     465//         int side = ws->getWeaponSide(); //FIXME / REMOVE: is not used// HACK needed for some weapons (left/right)
     466        this->getWeaponManager().setSlotPosition(slot, (*it).second->getCenter());
     467        this->getWeaponManager().setSlotDirection(slot, ws->getRelDir());
     468//         PRINTF(0)("setting slot %i\n", slot);
     469//         (*it).second->getCenter().debug();
     470      }
     471    }
     472  this->bInit = true;
     473  }
    474474
    475475  // Playable::tick(time);
  • branches/presentation/src/world_entities/weapons/disruptor.cc

    r10722 r10728  
    125125
    126126
     127  this->shootAnim[0][0]->addKeyFrame(Vector(0.0, 0.0, 0.0) * this->getScaling(), Quaternion(), 0.0333, ANIM_LINEAR, ANIM_NULL);
     128  this->shootAnim[0][0]->addKeyFrame(Vector(-0.5, 0.0, 0.0) * this->getScaling(), Quaternion(), 0.2, ANIM_LINEAR, ANIM_NULL);
    127129  this->shootAnim[0][0]->addKeyFrame(Vector(0.0, 0.0, 0.0) * this->getScaling(), Quaternion(), 0.1, ANIM_LINEAR, ANIM_NULL);
    128   this->shootAnim[0][0]->addKeyFrame(Vector(-0.5, 0.0, 0.0) * this->getScaling(), Quaternion(), 0.2, ANIM_LINEAR, ANIM_NULL);
    129 //   this->shootAnim[0][0]->addKeyFrame(Vector(0.0, 0.0, 0.0) * this->getScaling(), Quaternion(), 0.1, ANIM_LINEAR, ANIM_NULL);
    130130
    131131  Animation3D* animation2 = this->getAnimation(WS_ACTIVATING, this);
  • branches/presentation/src/world_entities/weapons/nadion_laser.cc

    r10722 r10728  
    148148  pj->setAbsCoor(this->getEmissionPoint());
    149149//   pj->setAbsDir(Quaternion(this->getDefaultTarget()->getAbsCoor() - this->getAbsCoor(), Vector(0,0,0)));
     150//   pj->setAbsDir(Quaternion(tmp.getNormalized(), this->getParent()->getAbsDir().apply(Vector(0,1,0))));
     151
    150152  pj->setAbsDir(this->getAbsDir());
    151153  pj->activate();
  • branches/presentation/src/world_entities/weapons/rf_cannon.cc

    r10722 r10728  
    142142  pj->setAbsCoor(this->emissionPoint[this->activeBarrel]->getAbsCoor());
    143143//   pj->setAbsDir(this->getAbsDir());
     144//   pj->setAbsDir(Quaternion(tmp.getNormalized(), this->getParent()->getAbsDir().apply(Vector(0,1,0))));
    144145
    145146  pj->activate();
  • branches/presentation/src/world_entities/weapons/weapon_manager.h

    r10721 r10728  
    5555    void hideCrosshair();
    5656    void setRotationSpeed(float speed);
    57 //     Crosshair* getCrosshair() {return this->crosshair; };
    5857
    59 //     virtual void process(const Event &event);
    6058
    6159    void setSlotCount(unsigned int slotCount);
     
    6361    // setting up the WeaponManager with the following functions
    6462    void setSlotPosition(int slot, const Vector& position, PNode* parent = NULL);
    65 //     inline void setSlotPosition(float slot, float x, float y,float z) {setSlotPosition((int)slot, Vector(x,y,z));};
    6663    void setSlotDirection(int slot, const Quaternion& rotation);
    6764    /** @param slot the slot to get the relative position from @returns the relative position of the Carrier to the Slot */
     
    104101
    105102    void fire();
    106     //! @TODO: implement this function (maybe also in Weapon itself)
    107103    void releaseFire();
    108     //inline void setFire() { this->bFire = true; };
    109104
    110105    void tick(float dt);
     
    113108    void debug() const;
    114109
    115  // private:
     110
    116111    int getNextFreeSlot(int configID, long capability = WTYPE_ALL);
    117112    CountPointer<AmmoContainer>& getAmmoContainer(const ClassID& projectileType);
Note: See TracChangeset for help on using the changeset viewer.