Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7105 in orxonox.OLD


Ignore:
Timestamp:
Feb 7, 2006, 10:17:17 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: ok, explosions are mighty cool now :)

Location:
trunk/src/world_entities
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/effects/explosion.cc

    r7104 r7105  
    4040  this->toList(OM_DEAD_TICK);
    4141
    42   this->emitter = new BoxEmitter(Vector(10,10,10), 1000, 30, M_2_PI);
     42  this->emitter = new BoxEmitter(Vector(10,10,10), 800, 30, M_2_PI);
    4343  this->emitter->addNodeFlags(PNODE_PROHIBIT_DELETE_WITH_PARENT);
    4444  this->emitter->setParent(this);
     
    4646
    4747  this->lifeCycle = 0.0f;
    48   this->lifeTime = 1.0f;
     48  this->lifeTime = .5f;
    4949
    5050}
     
    6868{
    6969  Explosion* explosion = dynamic_cast<Explosion*>(Explosion::fastFactory->resurrect());
    70   explosion->setParent(position);
     70  explosion->setAbsCoor(position->getAbsCoor());
    7171  explosion->emitter->setSize(size);
    7272  explosion->activate();
     
    8181    Explosion::explosionParticles->setName("ExplosionExplosionParticles");
    8282    Explosion::explosionParticles->setMaterialTexture("maps/radial-trans-noise.png");
    83     Explosion::explosionParticles->setLifeSpan(.5, .3);
     83    Explosion::explosionParticles->setLifeSpan(1.5, .3);
    8484    Explosion::explosionParticles->setRadius(0.0, 10);
    8585    Explosion::explosionParticles->setRadius(.5, 15.0);
     
    9292
    9393  this->emitter->setSystem(Explosion::explosionParticles);
     94  this->emitter->updateNode(.01);
    9495  this->toList(OM_DEAD_TICK);
    9596  this->lifeCycle = 0.0;
     
    101102  this->emitter->setSystem(NULL);
    102103  this->toList(OM_DEAD);
    103   this->emitter->setParent(PNode::getNullParent());
    104104  Explosion::fastFactory->kill(this);
    105105}
     
    112112void Explosion::tick (float dt)
    113113{
     114  printf("%f %f\n", this->lifeCycle, this->lifeTime);
    114115  this->lifeCycle += dt;
    115116  if(this->lifeTime < this->lifeCycle)
  • trunk/src/world_entities/npcs/ground_turret.cc

    r7104 r7105  
    178178{
    179179  this->setAbsDirSoft(Quaternion(-90, Vector(0,0,1)), 90);
    180   Explosion::explode(this, Vector(5,50,0));
     180  Explosion::explode(this, Vector(10,10,10));
    181181}
    182182
  • trunk/src/world_entities/space_ships/turbine_hover.cc

    r7072 r7105  
    272272void TurbineHover::tick (float dt)
    273273{
    274   this->debugNode(1);
     274//  this->debugNode(1);
    275275  Playable::tick(dt);
    276276
Note: See TracChangeset for help on using the changeset viewer.