Changeset 6173 in orxonox.OLD for branches/christmas_branche/src/world_entities/weapons
- Timestamp:
- Dec 20, 2005, 1:57:33 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/christmas_branche/src/world_entities/weapons/aim.cc
r6142 r6173 104 104 void Aim::searchTarget(float range) 105 105 { 106 //FIXME// 107 /* tIterator<WorldEntity>* iterator = State::getWorldEntityList()->getIterator(); 108 WorldEntity* entity = iterator->firstElement(); 109 while (likely(entity != NULL)) 106 std::list<WorldEntity*>::iterator entity; 107 108 for (entity = State::getObjectManager()->getObjectList(OM_GROUP_00).begin(); 109 entity != State::getObjectManager()->getObjectList(OM_GROUP_00).end(); 110 entity ++) 110 111 { 111 if ( entity->isA(CL_NPC) && this->source->getAbsCoor().x < entity->getAbsCoor().x && (this->source->getAbsCoor() - entity->getAbsCoor()).len() < range)112 if (this->source->getAbsCoor().x < (*entity)->getAbsCoor().x && (this->source->getAbsCoor() - (*entity)->getAbsCoor()).len() < range) 112 113 { 113 if (this->getParent() != entity)114 if (this->getParent() != (*entity)) 114 115 { 115 116 this->anim->replay(); 116 this->setParentSoft(entity, 5); 117 this->setParentSoft(*entity, 5); 118 return; 117 119 } 118 delete iterator;119 return;120 120 } 121 entity = iterator->nextElement();122 121 } 123 124 delete iterator;*/125 122 } 126 123
Note: See TracChangeset
for help on using the changeset viewer.