Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5457 in orxonox.OLD for trunk/src/world_entities


Ignore:
Timestamp:
Oct 30, 2005, 1:32:38 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: optimized Lasers

Location:
trunk/src/world_entities/weapons
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/weapons/laser.cc

    r5456 r5457  
    4141
    4242  float modelSize = .3;
    43   this->loadModelWithScale("models/projectiles/lasers.obj", .3);
     43  this->loadModel("models/projectiles/laser.obj");
    4444
    4545  this->energyMin = 1;
     
    5151  this->emitter->setParent(this);
    5252  this->emitter->setSpread(M_PI, M_PI);
    53   this->emitter->setEmissionRate(30.0);
     53  this->emitter->setEmissionRate(50.0);
    5454  this->emitter->setEmissionVelocity(50.0);
    5555}
     
    8383    Laser::explosionParticles->setName("LaserExplosionParticles");
    8484    Laser::explosionParticles->setLifeSpan(.5, .3);
    85     Laser::explosionParticles->setRadius(0.0, 10);
    86     Laser::explosionParticles->setRadius(.5, 20.0);
     85    Laser::explosionParticles->setRadius(0.0, 5);
     86    Laser::explosionParticles->setRadius(.5, 10.0);
    8787    Laser::explosionParticles->setRadius(1.0, 3.0);
    88     Laser::explosionParticles->setColor(0.0, 0,1,0,.9);
     88    Laser::explosionParticles->setColor(0.0, 1,1,0,.9);
    8989    Laser::explosionParticles->setColor(0.5, .8,.8,0,.5);
    90     Laser::explosionParticles->setColor(1.0, 1,1,1,.0);
     90    Laser::explosionParticles->setColor(1.0, .8,.8,.7,.0);
    9191  }
    9292}
     
    148148  glMatrixMode(GL_MODELVIEW);
    149149  glPushMatrix();
     150  glPushAttrib(GL_ENABLE_BIT);
     151  glDisable(GL_LIGHTING);
    150152
    151153  float matrix[4][4];
     
    155157  glScalef(2.0, 2.0, 2.0);
    156158  this->model->draw();
    157 
     159  glPopAttrib();
    158160  glPopMatrix();
    159161}
  • trunk/src/world_entities/weapons/test_gun.cc

    r5456 r5457  
    122122  this->loadModel("models/guns/test_gun.obj");
    123123
    124   this->setStateDuration(WS_SHOOTING, .3);
    125   this->setStateDuration(WS_RELOADING, .5);
     124  this->setStateDuration(WS_SHOOTING, .1);
     125  this->setStateDuration(WS_RELOADING, .1);
    126126  this->setStateDuration(WS_ACTIVATING, .4);
    127127  this->setStateDuration(WS_DEACTIVATING, .4);
     
    129129  this->setMaximumEnergy(1000, 100);
    130130  this->increaseEnergy(1000);
     131  this->setEmissionPoint(0,-100,0);
    131132  //this->minCharge = 2;
    132133
     
    136137  this->setProjectileType(CL_LASER);
    137138  this->prepareProjectiles(20);
     139
    138140}
    139141
Note: See TracChangeset for help on using the changeset viewer.