Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 25, 2006, 7:26:21 PM (18 years ago)
Author:
snellen
Message:

aim.cc works now

File:
1 edited

Legend:

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

    r6724 r6734  
    8282  this->anim->addKeyFrame(50, .01, ANIM_LINEAR);
    8383
     84
    8485/*  this->text = new Text();
    8586  this->text->setLayer(this->getLayer());
     
    114115    diffVec = ( (*entity)->getAbsCoor() - this->source->getAbsCoor() );
    115116
    116     if ( diffVec.len() < range  &&  acos( (this->source->getAbsDirX()).dot(diffVec)/(diffVec.len() * (this->source->getAbsDirX()).len() ) ) < angle)
     117    if ( diffVec.len() < range &&  acos( (this->source->getParent()->getAbsDirX()).dot(diffVec)/(diffVec.len() * (this->source->getAbsDirX()).len() ) ) < angle)
    117118    {
    118119      //if (this->getParent() != (*entity))
     
    170171   if(this->getParent() == PNode::getNullParent() ||
    171172      diffVec.len() > range  ||
    172       ( acos( (this->source->getAbsDirX()).dot(diffVec)/(diffVec.len() * (this->source->getAbsDirX()).len() ) ) > angle))
     173     ( acos( (this->source->getParent()->getAbsDirX()).dot(diffVec)/(diffVec.len() * (this->source->getAbsDirX()).len() ) ) > angle))
    173174    {
     175     this->setParentSoft(PNode::getNullParent(),5);
    174176     this->searchTarget();
    175177    }
     
    195197//                &objY,
    196198//                &objZ );
    197 //
     199//aa
    198200//   this->setAbsCoor(objX, objY, objZ);
    199201}
Note: See TracChangeset for help on using the changeset viewer.