Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10533 in orxonox.OLD


Ignore:
Timestamp:
Jan 31, 2007, 2:27:59 AM (17 years ago)
Author:
patrick
Message:

rotor flimmer fix

Location:
trunk/src/world_entities
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/environments/rotor.cc

    r10519 r10533  
    3434  //PRINTF(0)("loading Rotor");
    3535
     36  this->totalTime = 0.0;
     37
    3638  if (root != NULL)
    3739    this->loadParams(root);
     
    5557{
    5658     this->rotation = Vector(x,y,z);
     59/*     this->rotation = this->rotation.getNormalized();*/
    5760}
    5861
     
    6265void Rotor::tick(float dt)
    6366{
    64      this->shiftDir(Quaternion(rotation.x*dt, Vector(1,0,0)) * Quaternion(rotation.y*dt, Vector(0,1,0)) * Quaternion(rotation.z*dt, Vector(0,0,1)));
     67
     68  this->totalTime += dt;
     69
     70
     71
     72     this->setAbsDir(Quaternion(rotation.x*this->totalTime, Vector(1,0,0)) *
     73                    Quaternion(rotation.y*this->totalTime, Vector(0,1,0)) *
     74                    Quaternion(rotation.z*this->totalTime, Vector(0,0,1)));
    6575
    6676}
  • trunk/src/world_entities/environments/rotor.h

    r10276 r10533  
    2020
    2121    virtual ~Rotor();
    22  
     22
    2323    virtual void loadParams(const TiXmlElement* root);
    24  
     24
    2525    void initRotation(float x, float y, float z);
    26    
     26
    2727    virtual void tick(float time);
    28  
     28
    2929  private:
    3030    Vector              rotation;         //!< the rotation axis
    31 
     31    double              totalTime;        //!< total time
    3232};
    3333
  • trunk/src/world_entities/weapons/light_blaster.cc

    r10528 r10533  
    127127void LightBlaster::fire()
    128128{
    129   PRINTF(0)("=>>fir\n");
    130129  Projectile* pj =  this->getProjectile();
    131130  if (pj == NULL)
  • trunk/src/world_entities/weapons/swarm_launcher.cc

    r10516 r10533  
    155155  bool fired  = false;
    156156
     157  PRINTF(0)("fire\n");
    157158  Projectile* pj = NULL;
    158159  for( ObjectList<Playable>::const_iterator eIterator = Playable::objectList().begin(); eIterator !=Playable::objectList().end(); eIterator++)
Note: See TracChangeset for help on using the changeset viewer.