- Timestamp:
- Jul 30, 2006, 12:04:42 PM (18 years ago)
- Location:
- branches/proxy/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/world_entities/npcs/network_turret.cc
r9611 r9612 109 109 void NetworkTurret::tick(float dt) 110 110 { 111 if(this->getHealth() > 0.0f 112 ) // HACK <--- YOU ARE THE MOTHERFUCKER 111 ObjectManager::EntityList::iterator entity; 112 Vector diffVec; 113 for (entity = State::getObjectManager()->getObjectList((OM_LIST)this->targetGroup).begin(); 114 entity != State::getObjectManager()->getObjectList((OM_LIST)this->targetGroup).end(); 115 entity ++) 113 116 { 114 if (likely(this->weapon != NULL)) 117 diffVec = ( (*entity)->getAbsCoor() - this->getAbsCoor() ); 118 119 if ( diffVec.len() < 1000 )//&& acos( (this->source->getAbsDirX()).dot(diffVec)/(diffVec.len() * (this->source->getAbsDirX()).len() ) ) < angle) 115 120 { 116 // this->left->tickW(dt); 117 this->weapon->requestAction(WA_SHOOT); 121 //if (this->getParent() != (*entity)) 122 { 123 printf("found target::: %d %s::%s\n", (*entity)->getOMListNumber(), (*entity)->getClassCName(), (*entity)->getCName()); 124 125 this->weapon->requestAction(WA_SHOOT); 126 return; 127 } 118 128 } 119 129 } -
branches/proxy/src/world_entities/weapons/aim.cc
r9611 r9612 69 69 this->source = NULL; 70 70 71 this->range = 1000 0;71 this->range = 1000; 72 72 this->angle = M_PI_4; 73 73 this->targetGroup = OM_GROUP_01;
Note: See TracChangeset
for help on using the changeset viewer.