Changeset 10107 in orxonox.OLD for branches/playability/src/world_entities/weapons/swarm_launcher.cc
- Timestamp:
- Dec 19, 2006, 10:03:19 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/world_entities/weapons/swarm_launcher.cc
r10104 r10107 145 145 void SwarmLauncher::fire() 146 146 { 147 bool fired = false; 148 147 149 Projectile* pj = NULL; 148 150 for( ObjectList<Playable>::const_iterator eIterator = Playable::objectList().begin(); eIterator !=Playable::objectList().end(); eIterator++) … … 153 155 if (pj == NULL) 154 156 return; 155 157 158 fired = true; 156 159 pj->setVelocity(this->getVelocity()+(this->getAbsDir().apply(Vector(1,0,0))*115.0 + VECTOR_RAND(10))); 157 160 … … 164 167 } 165 168 } 169 if( !fired) 170 this->increaseEnergy( this->getProjectile()->getMinEnergy()); 166 171 }
Note: See TracChangeset
for help on using the changeset viewer.