Changeset 10037 in orxonox.OLD for branches/playability
- Timestamp:
- Dec 10, 2006, 1:51:44 PM (18 years ago)
- Location:
- branches/playability/src/world_entities
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/world_entities/projectiles/swarm_projectile.cc
r10035 r10037 38 38 39 39 /* this->loadModel("models/projectiles/orx-rocket.obj", 0.5);*/ 40 this->loadModel("models/projectiles/swarm_projectile.obj"); 40 this->loadModel("models/projectiles/swarm_projectile.obj"); // no double rescale (see draw()) 41 41 this->loadExplosionSound("sound/explosions/explosion_4.wav"); 42 42 … … 51 51 this->emitter->setParent(this); 52 52 this->emitter->setSpread(M_PI, M_PI); 53 54 this->rotationSpeed = 100; 55 this->angle = 0; 53 56 } 54 57 … … 214 217 velocity *= maxVelocity / velocity.len(); // set speed to max 215 218 219 216 220 this->shiftCoor(velocity * time); 217 221 218 222 if(this->tickLifeCycle(time)) 219 223 this->deactivate(); 224 225 this->updateAngle(time); 220 226 } 221 227 … … 239 245 } 240 246 247 void SwarmProjectile::updateAngle(float time) 248 { 249 this->angle += this->rotationSpeed * time; 250 } 241 251 242 252 void SwarmProjectile::draw () const … … 247 257 float matrix[4][4]; 248 258 glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z); 259 glRotatef(this->angle, 1.0f, 0.0f, 0.0f); //spinning missile 249 260 this->getAbsDir().matrix (matrix); 250 261 glMultMatrixf((float*)matrix); 251 //glScalef(2.0, 2.0, 2.0); 262 //glScalef(2.0, 2.0, 2.0); // no double rescale 252 263 this->getModel()->draw(); 253 264 -
branches/playability/src/world_entities/projectiles/swarm_projectile.h
r10035 r10037 51 51 Vector newDirection(Vector curDirection, Vector estTargetDir, float angle); 52 52 53 // spinning missle 54 void updateAngle(float time); 55 float rotationSpeed; 56 float angle; 53 57 }; 54 58 -
branches/playability/src/world_entities/space_ships/space_ship.cc
r10036 r10037 511 511 bFire = bSecFire = false; 512 512 513 // fire reqeust/release for primary weapons 513 514 if( this->bFire) 514 515 this->weaponMan.fire(); … … 516 517 this->weaponMan.releaseFire(); 517 518 519 // fire reqeust/release for secondary weapons 518 520 if( this->bSecFire) 519 521 this->secWeaponMan.fire(); -
branches/playability/src/world_entities/weapons/swarm_launcher.cc
r10023 r10037 91 91 92 92 this->setEmissionPoint(1.684, 0.472, 0); 93 //this->getProjectileFactory()->prepare(100);93 this->getProjectileFactory()->prepare(5); 94 94 95 this->setActionSound(WA_SHOOT, "sound/explosions/explosion_ 3.wav");95 this->setActionSound(WA_SHOOT, "sound/explosions/explosion_1.wav"); 96 96 this->setActionSound(WA_ACTIVATE, "sound/vocals/missiles.wav"); 97 97 this->setActionSound(WA_RELOAD, "sound/vocals/reload.wav"); -
branches/playability/src/world_entities/weapons/weapon.cc
r10036 r10037 352 352 if (likely(this->isActive())) 353 353 { 354 /** Disabled for releaseFire() from WM*/ 354 355 //if (this->requestedAction != WA_NONE) 355 356 // return;
Note: See TracChangeset
for help on using the changeset viewer.