- Timestamp:
- Jan 25, 2006, 8:43:09 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/spaceshipcontrol/src/world_entities/weapons/aim.cc
r6734 r6735 115 115 diffVec = ( (*entity)->getAbsCoor() - this->source->getAbsCoor() ); 116 116 117 if ( diffVec.len() < range && acos( (this->source->get Parent()->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) 118 118 { 119 119 //if (this->getParent() != (*entity)) … … 169 169 diffVec = ( this->getAbsCoor() - this->source->getAbsCoor() ); 170 170 //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->get Parent()->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)) 174 174 { 175 175 this->setParentSoft(PNode::getNullParent(),5);
Note: See TracChangeset
for help on using the changeset viewer.