Changeset 7076 in orxonox.OLD for trunk/src/world_entities/npcs/ground_turret.cc
- Timestamp:
- Feb 7, 2006, 3:46:43 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/npcs/ground_turret.cc
r6815 r7076 18 18 #include "world_entities/weapons/turret.h" 19 19 20 #include "state.h" 21 #include "playable.h" 22 #include "player.h" 23 24 20 25 #include "factory.h" 21 26 #include "network_game_manager.h" … … 58 63 this->left = NULL; 59 64 this->right = NULL; 65 66 this->setHealthMax(300); 67 this->setHealth(300); 60 68 61 69 /* left = new Turret(); … … 113 121 void GroundTurret::tick(float dt) 114 122 { 123 if(this->getHealth() > 0.0f && State::getPlayer() && 124 State::getPlayer()->getPlayable() && 125 State::getPlayer()->getPlayable()->distance(this) < 150) // HACK 126 { 115 127 if (likely(this->left != NULL)) 116 128 { … … 123 135 this->right->requestAction(WA_SHOOT); 124 136 } 125 137 } 126 138 } 127 139 … … 140 152 141 153 142 /**143 *144 *145 */146 void GroundTurret::collidesWith (WorldEntity* entity, const Vector& location)147 {148 if (entity->isA(CL_PROJECTILE))149 this->setAbsDirSoft(Quaternion(-90, Vector(0,0,1)), 90);150 }151 154 152 155 /** … … 166 169 { 167 170 171 } 172 173 void GroundTurret::destroy() 174 { 175 this->setAbsDirSoft(Quaternion(-90, Vector(0,0,1)), 90); 168 176 } 169 177
Note: See TracChangeset
for help on using the changeset viewer.