Changeset 10737 in orxonox.OLD for branches/presentation/src/world_entities
- Timestamp:
- Jun 20, 2007, 6:17:06 PM (18 years ago)
- Location:
- branches/presentation/src/world_entities
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/world_entities/projectiles/hbolt.cc
r10698 r10737 20 20 #include "state.h" 21 21 #include "model.h" 22 23 #include "world_entities/npcs/actionbox_enemy.h" 22 24 #include "world_entities/npcs/npc.h" 23 25 … … 125 127 { 126 128 printf("Collision with HBolt\n"); 127 if (this->hitEntity != entity && entity->isA(NPC::staticClassID()) || entity == this->target)129 if (this->hitEntity != entity/* && entity->isA(NPC::staticClassID())*/ && entity->isA(ActionboxEnemy::staticClassID()) || entity == this->target) 128 130 this->destroy( entity ); 129 131 this->hitEntity = entity; … … 148 150 this->angle += HBolt::rotationSpeed * dt; 149 151 150 for( ObjectList< NPC>::const_iterator eIterator = NPC::objectList().begin(); eIterator !=NPC::objectList().end(); eIterator++)152 for( ObjectList<ActionboxEnemy>::const_iterator eIterator = ActionboxEnemy::objectList().begin(); eIterator !=ActionboxEnemy::objectList().end(); eIterator++) 151 153 { 152 154 if( ((*eIterator)->getOMListNumber() != (this->origList -1)) && ((*eIterator)->getAbsCoor() - this->getAbsCoor()).len() <= 8) -
branches/presentation/src/world_entities/projectiles/hbolt.h
r10618 r10737 9 9 #include "projectile.h" 10 10 #include "effects/billboard.h" 11 11 12 12 13 class Vector; -
branches/presentation/src/world_entities/projectiles/nadion_blast.cc
r10728 r10737 23 23 #include "model.h" 24 24 25 #include "world_entities/npcs/actionbox_enemy.h" 25 26 #include "world_entities/npcs/npc.h" 26 27 … … 149 150 } 150 151 151 /* 152 void NadionBlast::hit (float damage, WorldEntity* entity )153 {154 155 if (this->hitEntity != entity)156 this->destroy( entity );157 this->hitEntity = entity;158 // dynamic_cast<SpaceShip*>(entity)->damage(this->getPhysDamage(),this->getElecDamage());159 //this->destroy(this);160 this->deactivate();161 162 return;163 164 }*/ 152 153 // void NadionBlast::hit (float damage, WorldEntity* entity ) 154 // { 155 // 156 // if (this->hitEntity != entity) 157 // this->destroy( entity ); 158 // this->hitEntity = entity; 159 // // dynamic_cast<SpaceShip*>(entity)->damage(this->getPhysDamage(),this->getElecDamage()); 160 // //this->destroy(this); 161 // this->deactivate(); 162 // 163 // return; 164 // 165 // } 165 166 166 167 /** … … 180 181 // this->trail->tick(dt); 181 182 182 for( ObjectList< NPC>::const_iterator eIterator = NPC::objectList().begin(); eIterator !=NPC::objectList().end(); eIterator++)183 for( ObjectList<ActionboxEnemy>::const_iterator eIterator = ActionboxEnemy::objectList().begin(); eIterator !=ActionboxEnemy::objectList().end(); eIterator++) 183 184 { 184 185 if( ((*eIterator)->getOMListNumber() != (this->origList -1)) && ((*eIterator)->getAbsCoor() - this->getAbsCoor()).len() <= 8) … … 215 216 // glRotatef(this->angle, 1.0f, 0.0f, 0.0f); //spinning missile 216 217 // HACK, need to be removed, once the AbsDir is correct, replace with the one above 217 glRotatef(this->angle, this->flightDirection.x, this->flightDirection.y, this->flightDirection.z);218 // glRotatef(this->angle, this->flightDirection.x, this->flightDirection.y, this->flightDirection.z); 218 219 this->getAbsDir().matrix (matrix); 219 220 glMultMatrixf((float*)matrix); -
branches/presentation/src/world_entities/projectiles/plasma_pulse.cc
r10698 r10737 21 21 22 22 #include "state.h" 23 #include "world_entities/npcs/actionbox_enemy.h" 23 24 24 25 #include <cassert> … … 112 113 this->grid->tick(dt); 113 114 114 for( ObjectList< Playable>::const_iterator eIterator = Playable::objectList().begin(); eIterator !=Playable::objectList().end(); eIterator++)115 for( ObjectList<ActionboxEnemy>::const_iterator eIterator = ActionboxEnemy::objectList().begin(); eIterator !=ActionboxEnemy::objectList().end(); eIterator++) 115 116 { 116 117 if( ((*eIterator)->getOMListNumber() != (this->origList -1)) && ((*eIterator)->getAbsCoor() - this->getAbsCoor()).len() <= 3) -
branches/presentation/src/world_entities/projectiles/test_bullet.cc
r10114 r10737 136 136 this->lifeCycle += time/this->lifeSpan; 137 137 if( this->lifeCycle >= 1.0) 138 139 140 141 138 { 139 PRINTF(5)("FINALIZE==========================\n"); 140 PRINTF(5)("current life cycle is: %f\n", this->lifeCycle); 141 PRINTF(5)("FINALIZE===========================\n"); 142 142 143 144 143 this->deactivate(); 144 } 145 145 } 146 146 -
branches/presentation/src/world_entities/weapons/nadion_laser.cc
r10733 r10737 155 155 // pj->setAbsDir(Quaternion(this->getDefaultTarget()->getAbsCoor() - this->getAbsCoor(), Vector(0,0,0))); 156 156 // pj->setAbsDir(Quaternion(tmp.getNormalized(), this->getParent()->getAbsDir().apply(Vector(0,1,0)))); 157 pj->setAbsDir(Quaternion(dir, up.getNormalized())); 158 157 // pj->setAbsDir(Quaternion(dir, up.getNormalized())); 158 pj->setAbsDir(Quaternion(dir, Vector(1,0,0))); 159 159 160 pj->setAbsDir(this->getAbsDir()); 160 161 pj->activate(); -
branches/presentation/src/world_entities/world_entity.h
r10721 r10737 226 226 void setHealthRegen(float regen) { this->healthRegen = regen; }; 227 227 void createImplantWidget(); 228 // CharacterAttributes* charAttr; //!< the character attributes of a world_entity229 228 230 229 void setShield(float shield) { this->shield = shield; }; … … 238 237 void setElectronicTH(float th) { this->electronicTH = th; }; 239 238 void setElectronicRegen(float regen) { this->electronicRegen = regen; }; 240 239 241 240 void setDamageable( bool damageable ){ this->damageable = damageable; } 242 241 bool getDamageable(){ return this->damageable; } … … 270 269 bool forwardDamageToParent; //!< if true, damage taken will be forwardet to parent 271 270 float healthMax; //!< The Maximal energy this entity can take. 272 float implantEnergy;//!< energy of implants273 float healthRegen; //!< Regeneration Rate of Health, mesured in units per second271 float implantEnergy; //!< energy of implants 272 float healthRegen; //!< Regeneration Rate of Health, mesured in units per second 274 273 OrxGui::GLGuiEnergyWidgetVertical* healthWidget; //!< The Slider (if wanted). 275 OrxGui::GLGuiEnergyWidgetVertical* implantWidget; 274 OrxGui::GLGuiEnergyWidgetVertical* implantWidget; 276 275 277 276 float shield; //!< current shield … … 324 323 float healthMax_write; 325 324 int healthMax_handle; 326 325 327 326 328 327
Note: See TracChangeset
for help on using the changeset viewer.