Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6173 in orxonox.OLD for branches/christmas_branche/src


Ignore:
Timestamp:
Dec 20, 2005, 1:57:33 AM (19 years ago)
Author:
bensch
Message:

christmas: aiming works again

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/christmas_branche/src/world_entities/weapons/aim.cc

    r6142 r6173  
    104104void Aim::searchTarget(float range)
    105105{
    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 ++)
    110111  {
    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)
    112113    {
    113       if (this->getParent() != entity)
     114      if (this->getParent() != (*entity))
    114115      {
    115116        this->anim->replay();
    116         this->setParentSoft(entity, 5);
     117        this->setParentSoft(*entity, 5);
     118        return;
    117119      }
    118       delete iterator;
    119       return;
    120120    }
    121     entity = iterator->nextElement();
    122121  }
    123 
    124   delete iterator;*/
    125122}
    126123
Note: See TracChangeset for help on using the changeset viewer.