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/mbolt.cc

    r10261 r10274  
    5353  this->setMinEnergy(4);
    5454  this->setHealthMax(0);
    55   this->lifeSpan = 3.0;
     55  this->lifeSpan = 1.5;
    5656  this->angle     = 0;
    5757
     
    107107void MBolt::activate()
    108108{
     109  this->toList(OM_ENVIRON);
    109110  if (unlikely(MBolt::explosionParticles == NULL))
    110111  {
     
    141142}
    142143
    143 void MBolt::hit (WorldEntity* entity, float damage)
     144void MBolt::hit (float damage, WorldEntity* entity )
    144145{
    145146
     
    170171  this->angle += MBolt::rotationSpeed * dt;
    171172  this->trail->tick(dt);
     173
     174  for( ObjectList<Playable>::const_iterator eIterator = Playable::objectList().begin(); eIterator !=Playable::objectList().end(); eIterator++)
     175  {
     176    if( ((*eIterator)->getOMListNumber() == OM_GROUP_00) && ((*eIterator)->getAbsCoor() - this->getAbsCoor()).len() <= 8)
     177    {
     178      (*eIterator)->hit (this->getDamage(),this);
     179      this->deactivate();
     180      PRINTF(0)("MBolt destroyed\n");
     181    }
     182  }
    172183}
    173184
Note: See TracChangeset for help on using the changeset viewer.