Changeset 9518 in orxonox.OLD for branches/proxy/src/world_entities
- Timestamp:
- Jul 27, 2006, 6:58:04 PM (18 years ago)
- Location:
- branches/proxy/src/world_entities
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/world_entities/npcs/ground_turret.cc
r9513 r9518 39 39 */ 40 40 GroundTurret::GroundTurret(const TiXmlElement* root) 41 : NPC(root)41 : NPC(root) 42 42 { 43 43 this->init(); … … 52 52 GroundTurret::~GroundTurret () 53 53 { 54 55 54 } 56 55 … … 88 87 // all the clases this Entity is directly derived from must be called in this way, to load all settings. 89 88 NPC::loadParams(root); 90 91 89 92 90 /** … … 126 124 void GroundTurret::tick(float dt) 127 125 { 128 if(this->getHealth() > 0.0f && State::getPlayer() && 129 State::getPlayer()->getPlayable() && 130 State::getPlayer()->getPlayable()->distance(this) < 120) // HACK 126 if(this->getHealth() > 0.0f 127 ) // HACK <--- YOU ARE THE MOTHERFUCKER 131 128 { 132 if (likely(this->left != NULL))133 {134 // this->left->tickW(dt);135 this->left->requestAction(WA_SHOOT);136 }137 if (likely(this->right != NULL))138 {139 // this->right->tickW(dt);140 this->right->requestAction(WA_SHOOT);141 }129 if (likely(this->left != NULL)) 130 { 131 // this->left->tickW(dt); 132 this->left->requestAction(WA_SHOOT); 133 } 134 if (likely(this->right != NULL)) 135 { 136 // this->right->tickW(dt); 137 this->right->requestAction(WA_SHOOT); 138 } 142 139 } 143 140 } … … 164 161 void GroundTurret::postSpawn () 165 162 { 166 167 163 } 168 164 … … 173 169 void GroundTurret::leftWorld () 174 170 { 175 176 171 } 177 172 -
branches/proxy/src/world_entities/weapons/aim.cc
r9516 r9518 71 71 this->range = 10000; 72 72 this->angle = M_PI_4; 73 this->targetGroup = OM_GROUP_0 2_PROJ;73 this->targetGroup = OM_GROUP_01; 74 74 this->anim = new tAnimation<Aim>(this, &Aim::setSize); 75 75 this->anim->setInfinity(ANIM_INF_CONSTANT); … … 132 132 void Aim::setTargetGroupS(const std::string& groupName) 133 133 { 134 printf("::::::::::::::::::::::: TEST\n");135 134 OM_LIST id = ObjectManager::StringToOMList(groupName); 136 135 if (id != OM_NULL) … … 138 137 else 139 138 PRINTF(2)("List %s not found for targetting\n", groupName.c_str()); 140 141 printf("targetGroup: %s, %d", groupName.c_str(), id);142 139 } 143 140 -
branches/proxy/src/world_entities/weapons/targeting_turret.h
r9516 r9518 26 26 virtual void draw() const; 27 27 28 const PNode* getLockedTarget() const { return lockedTarget; }; 29 28 30 private: 29 31 void init();
Note: See TracChangeset
for help on using the changeset viewer.