Changeset 10274 in orxonox.OLD for branches/playability/src/world_entities/projectiles
- Timestamp:
- Jan 17, 2007, 6:42:07 PM (18 years ago)
- Location:
- branches/playability/src/world_entities/projectiles
- Files:
-
- 6 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 -
branches/playability/src/world_entities/projectiles/hbolt.h
r10261 r10274 27 27 virtual void deactivate(); 28 28 29 virtual void hit ( WorldEntity* entity, float damage);29 virtual void hit (float damage, WorldEntity* entity); 30 30 31 31 virtual void destroy (WorldEntity* killer); -
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 -
branches/playability/src/world_entities/projectiles/lbolt.h
r10261 r10274 27 27 virtual void deactivate(); 28 28 29 virtual void hit ( WorldEntity* entity, float damage);29 virtual void hit (float damage, WorldEntity* entity); 30 30 31 31 virtual void destroy (WorldEntity* killer); -
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 -
branches/playability/src/world_entities/projectiles/mbolt.h
r10261 r10274 28 28 virtual void deactivate(); 29 29 30 virtual void hit ( WorldEntity* entity, float damage);30 virtual void hit (float damage, WorldEntity* entity); 31 31 32 32 virtual void destroy (WorldEntity* killer);
Note: See TracChangeset
for help on using the changeset viewer.