Changeset 10003 in orxonox.OLD for branches/playability/src/world_entities/projectiles
- Timestamp:
- Dec 3, 2006, 9:56:51 PM (18 years ago)
- Location:
- branches/playability/src/world_entities/projectiles
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/world_entities/projectiles/hbolt.cc
r10002 r10003 46 46 47 47 this->angle = 0; 48 this->rotationSpeed = 3; 49 this->axis = Vector (0, 0, -1); 48 this->rotationSpeed = 1000; 50 49 51 50 this->emitter = new DotEmitter(100, 5, M_2_PI); … … 119 118 void HBolt::updateAngle (float time) 120 119 { 121 this->angle = this->angle + this->rotationSpeed * time / 1000;120 this->angle = this->angle + this->rotationSpeed * time; 122 121 } 123 122 … … 158 157 159 158 160 void HBolt::draw () //const159 void HBolt::draw () const 161 160 { 162 glPushAttrib(GL_ENABLE_BIT);163 glDisable(GL_LIGHTING);164 161 165 162 glMatrixMode(GL_MODELVIEW); … … 176 173 //this->updateAngle(); 177 174 178 glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z); 179 glRotatef(this->angle, 0.0, 0.0, -1.0); 175 //glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z); 176 //glRotatef(this->angle, 0.0, 0.0, -1.0); 177 glTranslatef (this->getAbsCoor ().x, 178 this->getAbsCoor ().y, 179 this->getAbsCoor ().z); 180 Vector tmpRot = this->getAbsDir().getSpacialAxis(); 181 glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z ); 182 glRotatef(this->angle, 0.0, 0.0, 1.0); 180 183 this->getModel()->draw(); 181 //WorldEntity::draw();182 184 glPopMatrix(); 183 glPopAttrib();184 185 } 185 -
branches/playability/src/world_entities/projectiles/hbolt.h
r10001 r10003 31 31 32 32 virtual void tick (float dt); 33 virtual void draw () ; //const;33 virtual void draw () const; 34 34 35 35 virtual void updateAngle(float time); … … 45 45 float angle; 46 46 float rotationSpeed; 47 Vector axis;48 47 49 48 WorldEntity* hitEntity; // FIXME TEMPORARY
Note: See TracChangeset
for help on using the changeset viewer.