Changeset 10274 in orxonox.OLD for branches/playability/src/world_entities/projectiles/mbolt.cc
- Timestamp:
- Jan 17, 2007, 6:42:07 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/world_entities/projectiles/mbolt.cc
r10261 r10274 53 53 this->setMinEnergy(4); 54 54 this->setHealthMax(0); 55 this->lifeSpan = 3.0;55 this->lifeSpan = 1.5; 56 56 this->angle = 0; 57 57 … … 107 107 void MBolt::activate() 108 108 { 109 this->toList(OM_ENVIRON); 109 110 if (unlikely(MBolt::explosionParticles == NULL)) 110 111 { … … 141 142 } 142 143 143 void MBolt::hit ( WorldEntity* entity, float damage)144 void MBolt::hit (float damage, WorldEntity* entity ) 144 145 { 145 146 … … 170 171 this->angle += MBolt::rotationSpeed * dt; 171 172 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 } 172 183 } 173 184
Note: See TracChangeset
for help on using the changeset viewer.