Changeset 10274 in orxonox.OLD for branches/playability/src/world_entities/projectiles/hbolt.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/hbolt.cc
r10261 r10274 45 45 this->setMinEnergy(10); 46 46 this->setHealthMax(0); 47 this->lifeSpan = 7.0;47 this->lifeSpan = 2.0; 48 48 49 49 this->angle = 0; … … 84 84 void HBolt::activate() 85 85 { 86 this->toList(OM_ENVIRON); 86 87 if (unlikely(HBolt::explosionParticles == NULL)) 87 88 { … … 108 109 this->lifeCycle = 0.0; 109 110 110 this->toList(OM_ NULL);111 this->toList(OM_DEAD); 111 112 this->removeNode(); 112 113 HBolt::fastFactory->kill(this); 114 113 115 } 114 116 115 117 116 void HBolt::hit ( WorldEntity* entity, float damage)118 void HBolt::hit (float damage, WorldEntity* entity ) 117 119 { 118 120 printf("Collision with HBolt\n"); … … 140 142 this->angle += this->rotationSpeed * dt; 141 143 142 144 for( ObjectList<Playable>::const_iterator eIterator = Playable::objectList().begin(); eIterator !=Playable::objectList().end(); eIterator++) 145 { 146 if( ((*eIterator)->getOMListNumber() == OM_GROUP_00) && ((*eIterator)->getAbsCoor() - this->getAbsCoor()).len() <= 8) 147 { 148 (*eIterator)->hit (this->getDamage(),this); 149 this->deactivate(); 150 PRINTF(0)("HBolt destroyed\n"); 151 } 152 } 143 153 } 144 154
Note: See TracChangeset
for help on using the changeset viewer.