Changeset 10001 in orxonox.OLD for branches/playability
- Timestamp:
- Dec 3, 2006, 8:02:30 PM (18 years ago)
- Location:
- branches/playability
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability
- Property svn:ignore
-
old new 10 10 autom4te.cache 11 11 aclocal.m4 12 tags 13 test.bmp 14 config.sub 15 config.guess 16 OrxonoxPlayability.kdevses 17 OrxonoxPlayability.kdevelop.pcs
-
- Property svn:ignore
-
branches/playability/src/world_entities/projectiles/hbolt.cc
r9998 r10001 46 46 47 47 this->angle = 0; 48 this->rotationSpeed = 3; 48 this->rotationSpeed = .3; 49 this->axis = Vector (0, 0, -1); 49 50 50 51 this->emitter = new DotEmitter(100, 5, M_2_PI); … … 116 117 117 118 118 void HBolt::updateAngle ( )119 void HBolt::updateAngle (float time) 119 120 { 120 this->angle = this->angle + this->rotationSpeed ;121 this->angle = this->angle + this->rotationSpeed * time / 1000; 121 122 } 122 123 … … 135 136 this->deactivate(); 136 137 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); 138 144 139 145 } … … 172 178 glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z); 173 179 glRotatef(this->angle, 0.0, 0.0, -1.0); 174 //this->getModel()->draw();175 WorldEntity::draw();180 this->getModel()->draw(); 181 //WorldEntity::draw(); 176 182 glPopMatrix(); 177 183 glPopAttrib(); -
branches/playability/src/world_entities/projectiles/hbolt.h
r9989 r10001 33 33 virtual void draw (); //const; 34 34 35 virtual void updateAngle( );35 virtual void updateAngle(float time); 36 36 inline float getAngle() { return this->angle; }; 37 37 … … 45 45 float angle; 46 46 float rotationSpeed; 47 Vector axis; 47 48 48 49 WorldEntity* hitEntity; // FIXME TEMPORARY -
branches/playability/src/world_entities/space_ships/space_ship.cc
r9998 r10001 156 156 157 157 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); 162 162 this->weaponMan.addWeapon( wpLeft3, 0, 4); 163 163 this->weaponMan.addWeapon( wpRight3, 0, 5);
Note: See TracChangeset
for help on using the changeset viewer.