Changeset 10274 in orxonox.OLD for branches/playability/src/world_entities/projectiles/lbolt.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/lbolt.cc
r10261 r10274 47 47 this->setMinEnergy(1); 48 48 this->setHealthMax(0); 49 this->lifeSpan = 2.0;49 this->lifeSpan = 1.0; 50 50 51 51 this->emitter = new DotEmitter(100, 5, M_2_PI); … … 86 86 void LBolt::activate() 87 87 { 88 this->toList(OM_ENVIRON); 88 89 if (unlikely(LBolt::explosionParticles == NULL)) 89 90 { … … 110 111 this->lifeCycle = 0.0; 111 112 112 this->toList(OM_ NULL);113 this->toList(OM_DEAD); 113 114 this->removeNode(); 114 115 LBolt::fastFactory->kill(this); … … 116 117 117 118 118 void LBolt::hit ( WorldEntity* entity, float damage)119 void LBolt::hit (float damage, WorldEntity* entity ) 119 120 { 120 121 PRINTF(0)("Collision with LBolt\n"); … … 139 140 140 141 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 } 141 152 } 142 153
Note: See TracChangeset
for help on using the changeset viewer.