Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9612 in orxonox.OLD for branches/proxy


Ignore:
Timestamp:
Jul 30, 2006, 12:04:42 PM (18 years ago)
Author:
bensch
Message:

new range

Location:
branches/proxy/src/world_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/world_entities/npcs/network_turret.cc

    r9611 r9612  
    109109void NetworkTurret::tick(float dt)
    110110{
    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 ++)
    113116  {
    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)
    115120    {
    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      }
    118128    }
    119129  }
  • branches/proxy/src/world_entities/weapons/aim.cc

    r9611 r9612  
    6969  this->source = NULL;
    7070
    71   this->range = 10000;
     71  this->range = 1000;
    7272  this->angle = M_PI_4;
    7373  this->targetGroup = OM_GROUP_01;
Note: See TracChangeset for help on using the changeset viewer.