Changeset 10618 in orxonox.OLD for trunk/src/world_entities/projectiles
- Timestamp:
- Apr 4, 2007, 12:13:53 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 16 16 OrxonoxPlayability.kdevses 17 17 OrxonoxPlayability.kdevelop.pcs 18 orxonox.backtrace 19 orxonox.kdevses 20 orxonox.kdevelop.pcs
-
- Property svn:ignore
-
trunk/src/world_entities/projectiles/hbolt.cc
r10545 r10618 49 49 50 50 this->angle = 0; 51 this->rotationSpeed = 600;51 // this->rotationSpeed = 600; 52 52 53 53 this->emitter = new DotEmitter(100, 5, M_2_PI); … … 146 146 this->deactivate(); 147 147 148 this->angle += this->rotationSpeed * dt;148 this->angle += HBolt::rotationSpeed * dt; 149 149 150 150 for( ObjectList<NPC>::const_iterator eIterator = NPC::objectList().begin(); eIterator !=NPC::objectList().end(); eIterator++) … … 177 177 glPushAttrib(GL_ENABLE_BIT); 178 178 glDisable(GL_LIGHTING); 179 glDisable(GL_FOG);179 // glDisable(GL_FOG); 180 180 181 181 glMatrixMode(GL_MODELVIEW); 182 182 glPushMatrix(); 183 183 184 185 glTranslatef (this->getAbsCoor ().x, 186 this->getAbsCoor ().y, 187 this->getAbsCoor ().z); 188 189 this->halo->draw(); 190 191 Vector tmpRot = this->getAbsDir().getSpacialAxis(); 192 glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z ); 193 glRotatef(this->angle, 0.0, 0.0, 1.0); 194 195 this->getModel()->draw(); 184 // float matrix[4][4]; 185 glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z); 186 Vector tmpRot = this->getAbsDir().getSpacialAxis(); 187 glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z ); 188 glRotatef(this->angle, 0.0, 0.0, 1.0); 189 // glMultMatrixf((float*)matrix); 190 this->getModel()->draw(); 191 this->halo->draw(); 196 192 197 193 glPopMatrix(); -
trunk/src/world_entities/projectiles/hbolt.h
r10368 r10618 42 42 43 43 float angle; 44 float rotationSpeed;44 static const float rotationSpeed = 600; 45 45 46 46 Billboard* halo; -
trunk/src/world_entities/projectiles/lbolt.cc
r10545 r10618 59 59 60 60 this->angle = 0; 61 this->rotationSpeed = 130;62 61 63 62 this->halo = new Billboard(); … … 148 147 this->deactivate(); 149 148 150 angle += rotationSpeed * dt;149 angle += LBolt::rotationSpeed * dt; 151 150 152 151 for( ObjectList<NPC>::const_iterator eIterator = NPC::objectList().begin(); eIterator !=NPC::objectList().end(); eIterator++) … … 182 181 glPushMatrix(); 183 182 184 float matrix[4][4]; 185 glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z); 183 float matrix[4][4]; 184 glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z); 185 Vector tmpRot = this->getAbsDir().getSpacialAxis(); 186 glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z ); 187 glRotatef(this->angle, 1.0, 0.0, 0.0); 188 this->getAbsDir().matrix (matrix); 189 glMultMatrixf((float*)matrix); 190 this->getModel()->draw(); 186 191 187 glRotatef(angle, 1.0, 0.0, 0.0); 188 this->getAbsDir().matrix (matrix); 189 glMultMatrixf((float*)matrix); 190 this->getModel()->draw(); 191 192 this->halo->draw(); 192 this->halo->draw(); 193 193 194 194 glPopMatrix(); 195 196 195 glPopAttrib(); 197 196 } -
trunk/src/world_entities/projectiles/lbolt.h
r10368 r10618 43 43 44 44 float angle; 45 float rotationSpeed;45 static const float rotationSpeed = 1080; 46 46 47 47 Billboard* halo; -
trunk/src/world_entities/projectiles/mbolt.cc
r10545 r10618 82 82 //this->trail->setParent( this); 83 83 this->trail->setTexture( "textures/laser.png"); 84 this->trail->setAbsCoor(this->getAbsCoor() - Vector(.7,0,0)); 84 // this->trail->setAbsCoor(this->getAbsCoor() - Vector(.7,0,0)); 85 this->trail->setAbsCoor(this->getAbsCoor() - this->getVelocity().getNormalized() * .7); 85 86 86 87 } -
trunk/src/world_entities/projectiles/projectile_weapon.h
r10368 r10618 1 1 /*! 2 2 * @file projectile_weapon.h 3 * a projectile_weapon , that is been shooted by a weapon3 * a projectile_weapon is a projetile fireing projectile. 4 4 * 5 * You can use this class to make some ProjectileWeapons/Bullets/Lasers/Rockets/etc. 5 * You can use this class to make some Multi-Stage Projectiles. 6 * See Spike_Ball for an implemeted example. 6 7 * 7 8 */ -
trunk/src/world_entities/projectiles/swarm_projectile.cc
r10547 r10618 39 39 SwarmProjectile::SwarmProjectile () : Projectile() 40 40 { 41 42 /* this->loadModel("models/projectiles/orx-rocket.obj", 0.5);*/ 43 this->loadModel("models/projectiles/swarm_projectile.obj", .25); // no double rescale (see draw()) 41 this->loadModel("models/projectiles/swarm_projectile.obj", .333); // no double rescale (see draw()) 44 42 this->loadExplosionSound("sounds/explosions/explosion_4.wav"); 45 43 … … 59 57 this->elecDamage = 0; 60 58 61 this->trail = new Trail(2.5,4,.2, this); 62 //this->trail->setParent( this); 59 this->trail = new Trail(2.5, 4, .2, this); 63 60 this->trail->setTexture( "textures/laser.png"); 61 62 // this->maxVelocity = 300; 63 64 this->smoke = new Trail(20, 10, .3, this); 65 this->smoke->setTexture ("textures/engine.png"); 66 67 this->angle = 0; 68 64 69 65 70 … … 83 88 // delete this->emitter; 84 89 delete this->trail; 90 delete this->smoke; 85 91 } 86 92 … … 113 119 this->setHealth(10.0* (float)rand()/(float)RAND_MAX); 114 120 115 this->maxVelocity = 300;116 117 this->rotationSpeed = 360;121 // this->maxVelocity = 300; 122 123 // this->rotationSpeed = 360; 118 124 this->angle = 0; 119 125 … … 216 222 217 223 this->trail->tick(time); 224 this->smoke->tick(time); 218 225 219 226 this->angle += this->rotationSpeed * time; 227 220 228 while (this->angle > 360) 229 { 221 230 this->angle -= 360; 231 } 222 232 223 233 this->lastDir = this->curDir; … … 272 282 glTranslatef(-.9,0,0); 273 283 this->trail->draw(); 284 glTranslatef( -1.1, 0, 0); 285 this->smoke->draw(); 274 286 glPopMatrix(); 275 287 } -
trunk/src/world_entities/projectiles/swarm_projectile.h
r10368 r10618 1 1 /*! 2 2 * @file swarm_projectile.h 3 * @brief a Swarm Projectile Projectile3 * @brief a Swarm_Missile Projectile 4 4 */ 5 5 … … 40 40 41 41 Trail* trail; 42 Trail* smoke; 42 43 43 44 ParticleEmitter* emitter; 44 45 float agility; 45 float maxVelocity;46 const static float maxVelocity = 100; 46 47 float speed; 47 48 Vector diffVector ; … … 57 58 58 59 // spinning missle 59 float rotationSpeed;60 const static float rotationSpeed = 360; 60 61 float angle; 61 62 };
Note: See TracChangeset
for help on using the changeset viewer.