Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 19, 2006, 10:03:19 PM (18 years ago)
Author:
marcscha
Message:

many additions, several fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/playability/src/world_entities/weapons/swarm_launcher.cc

    r10104 r10107  
    145145void SwarmLauncher::fire()
    146146{
     147  bool fired  = false;
     148
    147149  Projectile* pj = NULL;
    148150  for( ObjectList<Playable>::const_iterator eIterator = Playable::objectList().begin(); eIterator !=Playable::objectList().end(); eIterator++)
     
    153155      if (pj == NULL)
    154156        return;
    155 
     157     
     158      fired = true;
    156159      pj->setVelocity(this->getVelocity()+(this->getAbsDir().apply(Vector(1,0,0))*115.0 + VECTOR_RAND(10)));
    157160
     
    164167    }
    165168  }
     169  if( !fired)
     170    this->increaseEnergy( this->getProjectile()->getMinEnergy());
    166171}
Note: See TracChangeset for help on using the changeset viewer.