Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10001 in orxonox.OLD for branches


Ignore:
Timestamp:
Dec 3, 2006, 8:02:30 PM (18 years ago)
Author:
nicolasc
Message:

reactivated rotation in hbolt.cc

Location:
branches/playability
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/playability

    • Property svn:ignore
      •  

        old new  
        1010autom4te.cache
        1111aclocal.m4
         12tags
         13test.bmp
         14config.sub
         15config.guess
         16OrxonoxPlayability.kdevses
         17OrxonoxPlayability.kdevelop.pcs
  • branches/playability/src/world_entities/projectiles/hbolt.cc

    r9998 r10001  
    4646
    4747  this->angle = 0;
    48   this->rotationSpeed = 3;
     48  this->rotationSpeed = .3;
     49  this->axis = Vector (0, 0, -1);
    4950
    5051  this->emitter = new DotEmitter(100, 5, M_2_PI);
     
    116117
    117118
    118 void HBolt::updateAngle ()
     119void HBolt::updateAngle (float time)
    119120{
    120   this->angle = this->angle + this->rotationSpeed;
     121  this->angle = this->angle + this->rotationSpeed * time / 1000;
    121122}
    122123
     
    135136    this->deactivate();
    136137
    137   this->updateAngle();
     138  //float w = this->rotationSpeed * M_PI;
     139  Quaternion rotation(this->rotationSpeed * dt, this->axis);
     140  Quaternion u = this->getRelDir();
     141  this->setRelDir(u * rotation);
     142
     143  this->updateAngle(dt);
    138144
    139145}
     
    172178  glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
    173179  glRotatef(this->angle, 0.0, 0.0, -1.0);
    174   //this->getModel()->draw();
    175   WorldEntity::draw();
     180  this->getModel()->draw();
     181  //WorldEntity::draw();
    176182  glPopMatrix();
    177183  glPopAttrib();
  • branches/playability/src/world_entities/projectiles/hbolt.h

    r9989 r10001  
    3333    virtual void draw (); //const;
    3434
    35     virtual void updateAngle();
     35    virtual void updateAngle(float time);
    3636    inline float getAngle() { return this->angle; };
    3737
     
    4545    float                             angle;
    4646    float                             rotationSpeed;
     47    Vector                            axis;
    4748
    4849    WorldEntity* hitEntity; // FIXME TEMPORARY
  • branches/playability/src/world_entities/space_ships/space_ship.cc

    r9998 r10001  
    156156
    157157
    158   this->weaponMan.addWeapon( wpLeft1, 0, 0);
    159   this->weaponMan.addWeapon( wpRight1, 0, 1);
    160   this->weaponMan.addWeapon( wpLeft2, 0, 2);
    161   this->weaponMan.addWeapon( wpRight2, 0, 3);
     158  this->weaponMan.addWeapon( wpLeft1, 1, 0);
     159  this->weaponMan.addWeapon( wpRight1, 1, 1);
     160  this->weaponMan.addWeapon( wpLeft2, 1, 2);
     161  this->weaponMan.addWeapon( wpRight2, 1, 3);
    162162  this->weaponMan.addWeapon( wpLeft3, 0, 4);
    163163  this->weaponMan.addWeapon( wpRight3, 0, 5);
Note: See TracChangeset for help on using the changeset viewer.