Changeset 10740 in orxonox.OLD for branches/presentation/src/world_entities/projectiles
- Timestamp:
- Jun 20, 2007, 8:00:41 PM (17 years ago)
- Location:
- branches/presentation/src/world_entities/projectiles
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/world_entities/projectiles/acid_splash.cc
r10701 r10740 24 24 #include <cassert> 25 25 #include "debug.h" 26 27 #include "obb_tree.h" 26 28 27 29 #include "effects/wobblegrid.h" … … 69 71 70 72 this->grid->toList(OM_ENVIRON); 73 74 this->obbTree = new OBBTree(); 75 this->obbTree->createBox(Vector(0.0f, 0.0f, 0.0f), Vector(1.0f, 1.0f, 1.0f)); 76 this->setOBBTree(this->obbTree); 71 77 } 72 78 … … 125 131 126 132 this->grid->tick(dt); 127 128 for( ObjectList<Playable>::const_iterator eIterator = Playable::objectList().begin(); eIterator !=Playable::objectList().end(); eIterator++)129 {130 if( ((*eIterator)->getOMListNumber() != (this->origList -1)) && ((*eIterator)->getAbsCoor() - this->getAbsCoor()).len() <= 8)131 {132 (*eIterator)->hit (this->getDamage(),this);133 this->deactivate();134 }135 }136 137 133 } 138 134 -
branches/presentation/src/world_entities/projectiles/acid_splash.h
r10368 r10740 41 41 42 42 WorldEntity* hitEntity; // FIXME TEMPORARY 43 OBBTree* obbTree; 43 44 }; 44 45 -
branches/presentation/src/world_entities/projectiles/hbolt.cc
r10739 r10740 29 29 #include <cassert> 30 30 #include "debug.h" 31 32 #include "obb_tree.h" 31 33 32 34 // #include "effects/billboard.h" … … 63 65 this->halo->setTexture("hbolt_halo2.png"); 64 66 this->halo->setVisibility(false); 67 68 this->obbTree = new OBBTree(); 69 this->obbTree->createBox(Vector(0.0f, 0.0f, 0.0f), Vector(1.0f, 1.0f, 1.0f)); 70 this->setOBBTree(this->obbTree); 65 71 66 72 } … … 149 155 150 156 this->angle += HBolt::rotationSpeed * dt; 151 152 for( ObjectList<ActionboxEnemy>::const_iterator eIterator = ActionboxEnemy::objectList().begin(); eIterator !=ActionboxEnemy::objectList().end(); eIterator++)153 {154 if( ((*eIterator)->getOMListNumber() != (this->origList -1)) && ((*eIterator)->getAbsCoor() - this->getAbsCoor()).len() <= 8)155 {156 (*eIterator)->destroy(this); //hit (this->getDamage(),this);157 this->deactivate();158 PRINTF(0)("HBolt destroyed\n");159 }160 }161 157 } 162 158 -
branches/presentation/src/world_entities/projectiles/hbolt.h
r10737 r10740 48 48 49 49 WorldEntity* hitEntity; // FIXME TEMPORARY 50 OBBTree* obbTree; 50 51 }; 51 52 -
branches/presentation/src/world_entities/projectiles/lbolt.cc
r10698 r10740 31 31 #include <cassert> 32 32 #include "debug.h" 33 34 #include "obb_tree.h" 33 35 34 36 #include "space_ships/space_ship.h" … … 67 69 this->halo->setPulse(); 68 70 71 72 this->obbTree = new OBBTree(); 73 this->obbTree->createBox(Vector(0.0f, 0.0f, 0.0f), Vector(1.0f, 1.0f, 1.0f)); 74 this->setOBBTree(this->obbTree); 69 75 } 70 76 … … 151 157 if(angle > 360) 152 158 angle -= 360; 153 154 for( ObjectList<NPC>::const_iterator eIterator = NPC::objectList().begin(); eIterator !=NPC::objectList().end(); eIterator++)155 {156 if( ((*eIterator)->getOMListNumber() != (this->origList -1)) && ((*eIterator)->getAbsCoor() - this->getAbsCoor()).len() <= 8)157 {158 (*eIterator)->destroy(this); //hit (this->getDamage(),this);159 this->deactivate();160 PRINTF(0)("LBolt destroyed\n");161 }162 }163 159 } 164 160 -
branches/presentation/src/world_entities/projectiles/lbolt.h
r10618 r10740 48 48 49 49 WorldEntity* hitEntity; // FIXME TEMPORARY 50 OBBTree* obbTree; 50 51 }; 51 52 -
branches/presentation/src/world_entities/projectiles/mbolt.cc
r10698 r10740 36 36 37 37 #include "effects/trail.h" 38 39 #include "obb_tree.h" 38 40 39 41 … … 84 86 // this->trail->setAbsCoor(this->getAbsCoor() - Vector(.7,0,0)); 85 87 this->trail->setAbsCoor(this->getAbsCoor() - this->getVelocity().getNormalized() * .7); 88 89 this->obbTree = new OBBTree(); 90 this->obbTree->createBox(Vector(0.0f, 0.0f, 0.0f), Vector(1.0f, 1.0f, 1.0f)); 91 this->setOBBTree(this->obbTree); 86 92 87 93 } … … 178 184 this->angle += MBolt::rotationSpeed * dt; 179 185 this->trail->tick(dt); 180 181 for( ObjectList<NPC>::const_iterator eIterator = NPC::objectList().begin(); eIterator !=NPC::objectList().end(); eIterator++)182 {183 if( ((*eIterator)->getOMListNumber() != (this->origList -1)) && ((*eIterator)->getAbsCoor() - this->getAbsCoor()).len() <= 8)184 {185 (*eIterator)->destroy(this); //hit (this->getDamage(),this);186 this->deactivate();187 PRINTF(0)("MBolt destroyed\n");188 }189 }190 186 } 191 187 -
branches/presentation/src/world_entities/projectiles/mbolt.h
r10368 r10740 50 50 51 51 WorldEntity* hitEntity; // FIXME TEMPORARY 52 OBBTree* obbTree; 52 53 }; 53 54 -
branches/presentation/src/world_entities/projectiles/nadion_blast.cc
r10737 r10740 180 180 this->angle += NadionBlast::rotationSpeed * dt; 181 181 // this->trail->tick(dt); 182 183 for( ObjectList<ActionboxEnemy>::const_iterator eIterator = ActionboxEnemy::objectList().begin(); eIterator !=ActionboxEnemy::objectList().end(); eIterator++)184 {185 if( ((*eIterator)->getOMListNumber() != (this->origList -1)) && ((*eIterator)->getAbsCoor() - this->getAbsCoor()).len() <= 8)186 {187 (*eIterator)->destroy(this); //hit (this->getDamage(),this);188 this->deactivate();189 PRINTF(0)("NadionBlast destroyed\n");190 }191 }192 182 } 193 183 -
branches/presentation/src/world_entities/projectiles/plasma_pulse.cc
r10739 r10740 25 25 #include <cassert> 26 26 #include "debug.h" 27 28 #include "obb_tree.h" 27 29 28 30 … … 59 61 this->blink->loadBlinkSequence( "66678998766" ); 60 62 this->blink->toList(OM_ENVIRON);*/ 63 64 this->obbTree = new OBBTree(); 65 this->obbTree->createBox(Vector(0.0f, 0.0f, 0.0f), Vector(1.0f, 1.0f, 1.0f)); 66 this->setOBBTree(this->obbTree); 61 67 } 62 68 … … 112 118 113 119 this->grid->tick(dt); 114 115 for( ObjectList<ActionboxEnemy>::const_iterator eIterator = ActionboxEnemy::objectList().begin(); eIterator !=ActionboxEnemy::objectList().end(); eIterator++)116 {117 if( ((*eIterator)->getOMListNumber() != (this->origList -1)) && ((*eIterator)->getAbsCoor() - this->getAbsCoor()).len() <= 3)118 {119 (*eIterator)->hit (this->getDamage(),this);120 this->deactivate();121 }122 }123 124 120 } 125 121 -
branches/presentation/src/world_entities/projectiles/plasma_pulse.h
r10698 r10740 34 34 static FastFactory* fastFactory; 35 35 Billboard* grid; 36 OBBTree* obbTree; 36 37 // Blink* blink; 37 38 };
Note: See TracChangeset
for help on using the changeset viewer.