Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6735 in orxonox.OLD


Ignore:
Timestamp:
Jan 25, 2006, 8:43:09 PM (18 years ago)
Author:
snellen
Message:

aim.cc updated

File:
1 edited

Legend:

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

    r6734 r6735  
    115115    diffVec = ( (*entity)->getAbsCoor() - this->source->getAbsCoor() );
    116116
    117     if ( diffVec.len() < range &&  acos( (this->source->getParent()->getAbsDirX()).dot(diffVec)/(diffVec.len() * (this->source->getAbsDirX()).len() ) )  < angle)
     117    if ( diffVec.len() < range &&  acos( (this->source->getAbsDirX()).dot(diffVec)/(diffVec.len() * (this->source->getAbsDirX()).len() ) )  < angle)
    118118    {
    119119      //if (this->getParent() != (*entity))
     
    169169  diffVec = ( this->getAbsCoor() - this->source->getAbsCoor() );
    170170//only look for target if the aim hasn`t locked a target yet or if the actual target is out of range
    171    if(this->getParent() == PNode::getNullParent() || 
    172       diffVec.len() > range  || 
    173      ( acos( (this->source->getParent()->getAbsDirX()).dot(diffVec)/(diffVec.len() * (this->source->getAbsDirX()).len() ) ) > angle))
     171   if(this->getParent() == PNode::getNullParent() ||
     172      diffVec.len() > range  ||
     173     ( acos( (this->source->getAbsDirX()).dot(diffVec)/(diffVec.len() * (this->source->getAbsDirX()).len() ) ) > angle))
    174174    {
    175175     this->setParentSoft(PNode::getNullParent(),5);
Note: See TracChangeset for help on using the changeset viewer.