Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2007, 6:42:07 PM (17 years ago)
Author:
marcscha
Message:

fixes and workaround bugs of Orx

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/playability/src/world_entities/projectiles/lbolt.cc

    r10261 r10274  
    4747  this->setMinEnergy(1);
    4848  this->setHealthMax(0);
    49   this->lifeSpan = 2.0;
     49  this->lifeSpan = 1.0;
    5050
    5151  this->emitter = new DotEmitter(100, 5, M_2_PI);
     
    8686void LBolt::activate()
    8787{
     88  this->toList(OM_ENVIRON);
    8889  if (unlikely(LBolt::explosionParticles == NULL))
    8990  {
     
    110111  this->lifeCycle = 0.0;
    111112
    112   this->toList(OM_NULL);
     113  this->toList(OM_DEAD);
    113114  this->removeNode();
    114115  LBolt::fastFactory->kill(this);
     
    116117
    117118
    118 void LBolt::hit (WorldEntity* entity, float damage)
     119void LBolt::hit (float damage, WorldEntity* entity )
    119120{
    120121  PRINTF(0)("Collision with LBolt\n");
     
    139140
    140141  angle += rotationSpeed * dt;
     142
     143  for( ObjectList<Playable>::const_iterator eIterator = Playable::objectList().begin(); eIterator !=Playable::objectList().end(); eIterator++)
     144  {
     145    if( ((*eIterator)->getOMListNumber() == OM_GROUP_00)  && ((*eIterator)->getAbsCoor() - this->getAbsCoor()).len() <= 8)
     146    {
     147      (*eIterator)->hit (this->getDamage(),this);
     148      this->deactivate();
     149  PRINTF(0)("LBolt destroyed\n");
     150    }
     151  }
    141152}
    142153
Note: See TracChangeset for help on using the changeset viewer.