Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10763 in orxonox.OLD for branches/presentation/src/world_entities


Ignore:
Timestamp:
Jun 21, 2007, 3:35:24 AM (18 years ago)
Author:
nicolasc
Message:

moved loadShield (XML), some minor cleanup

Location:
branches/presentation/src/world_entities
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/world_entities/projectiles/mbolt.cc

    r10747 r10763  
    5252  this->loadModel("models/projectiles/mbolt.obj",4);
    5353
    54 
    55   //this->loadModel("models/projectiles/laser.obj");
    56 
    5754  this->setMinEnergy(4);
    5855  this->setHealthMax(0);
     
    6057  this->angle     = 0;
    6158
    62   //this->emitter = new DotEmitter(1000, 0, 0);
    6359  this->emitter = new DotEmitter(50, 0, 0);
    6460  this->emitter->setParent(this);
     
    6965
    7066  this->mat = new Material("mBolt");
    71   //this->mat->setBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
    7267  this->mat->setBlendFunc(GL_SRC_ALPHA,GL_ONE);
    7368  this->mat->setDiffuse(1,1,1);
     
    8277
    8378  this->trail = new Trail(6, 4, .1, this);
    84   //this->trail->setParent( this);
    8579  this->trail->setTexture( "textures/laser.png");
    86 //   this->trail->setAbsCoor(this->getAbsCoor() - Vector(.7,0,0));
    8780  this->trail->setAbsCoor(this->getAbsCoor() - this->getVelocity().getNormalized() * .7);
    88  
     81
    8982  this->obbTree = new OBBTree();
    9083  this->obbTree->createBox(Vector(0.0f, 0.0f, 0.0f), Vector(1.0f, 1.0f, 1.0f));
     
    117110void MBolt::activate()
    118111{
    119 //   this->origList = this->getOMListNumber();
    120 //   this->toList(OM_ENVIRON);
    121112  if (unlikely(MBolt::explosionParticles == NULL))
    122113  {
     
    154145  MBolt::fastFactory->kill(this);
    155146}
     147  // HACK direction AbsDir calulation
    156148
    157149void MBolt::hit (float damage, WorldEntity* entity )
     
    161153    this->destroy( entity );
    162154  this->hitEntity = entity;
    163  // dynamic_cast<SpaceShip*>(entity)->damage(this->getPhysDamage(),this->getElecDamage());
    164   //this->destroy(this);
     155
    165156  this->deactivate();
    166157
     
    175166void MBolt::tick (float dt)
    176167{
    177   //Vector v = *this->flightDirection * ( this->speed * time * 1000 + 0.1);
    178168  Vector v = this->velocity * dt;
    179169  this->shiftCoor(v);
     
    191181void MBolt::destroy (WorldEntity* killer)
    192182{
    193   //this->deactivate();
    194183  Projectile::destroy( killer );
    195184  PRINTF(5)("DESTROY MBolt\n");
  • branches/presentation/src/world_entities/projectiles/plasma_pulse.cc

    r10758 r10763  
    134134  glPushMatrix();
    135135  glPushAttrib(GL_ENABLE_BIT);
    136     glEnable( GL_ALPHA_TEST);
    137     glAlphaFunc( GL_GEQUAL, .5);
     136//     glEnable( GL_ALPHA_TEST);
     137//     glAlphaFunc( GL_GEQUAL, .5);
    138138    this->grid->draw();
    139139//     this->blink->draw();
  • branches/presentation/src/world_entities/space_ships/space_ship.cc

    r10761 r10763  
    264264  this->weaponMan.getFixedTarget()->setParent(this);
    265265  this->weaponMan.getFixedTarget()->setRelCoor(100000,0,0);
    266 
     266  this->weaponMan.setRotationSpeed(0);
     267//   this->weaponMan.hideCrosshair();
    267268
    268269  this->secWeaponMan.getFixedTarget()->setParent(this);
     
    338339  LoadParam(root, "loadReactor", this, SpaceShip, loadReactor)
    339340  .describe("set reactor output");
    340   LoadParam(root, "loadShield", this, WorldEntity, loadShield)
    341   .describe("set shield parameters: current strenght , max strenght, threshhold value (0..1), regeneration rate");
    342 //   LoadParam(root, "loadHealth", this, WorldEntity, loadHealth)
    343 //   .describe("set armor/health parameters: current strenght , max strenght");
    344341  LoadParam(root, "loadElectronic", this, WorldEntity, loadElectronic)
    345342  .describe("set electronics parameters: current strenght , max strenght, threshhold value (0..1), regeneration rate");
  • branches/presentation/src/world_entities/weapons/nadion_laser.cc

    r10737 r10763  
    1010
    1111   ### File Specific
    12    main-programmer: Marc Schaerrer, Nicolas Schlumberger
     12   main-programmer: Nicolas Schlumberger
    1313   co-programmer:
    1414
     
    5454NadionLaser::~NadionLaser()
    5555{
    56       // model will be deleted from WorldEntity-destructor
     56  // model will be deleted from WorldEntity-destructor
    5757  for (int i = 0; i < this->getBarrels(); i++)
    5858  {
     
    7373  this->loadModel("models/guns/nadion_laser.obj", this->getScaling());
    7474
    75   this->setStateDuration(WS_SHOOTING, 0.1666);   // 6 Schuss pro Sekunde
     75  this->setStateDuration(WS_SHOOTING, 0.1666);   // 6 shots per second
    7676
    7777  this->setStateDuration(WS_RELOADING, 0);
  • branches/presentation/src/world_entities/world_entity.cc

    r10760 r10763  
    195195  LoadParam(root, "loadHealth", this, WorldEntity, loadHealth)
    196196      .describe("set armor/health parameters: current strenght , max strenght");
     197  LoadParam(root, "loadShield", this, WorldEntity, loadShield)
     198      .describe("set shield parameters: current strenght , max strenght, threshhold value (0..1), regeneration rate");
    197199}
    198200
Note: See TracChangeset for help on using the changeset viewer.