Changeset 6734 in orxonox.OLD for branches/spaceshipcontrol/src/world_entities/weapons/aim.cc
- Timestamp:
- Jan 25, 2006, 7:26:21 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/spaceshipcontrol/src/world_entities/weapons/aim.cc
r6724 r6734 82 82 this->anim->addKeyFrame(50, .01, ANIM_LINEAR); 83 83 84 84 85 /* this->text = new Text(); 85 86 this->text->setLayer(this->getLayer()); … … 114 115 diffVec = ( (*entity)->getAbsCoor() - this->source->getAbsCoor() ); 115 116 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) 117 118 { 118 119 //if (this->getParent() != (*entity)) … … 170 171 if(this->getParent() == PNode::getNullParent() || 171 172 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)) 173 174 { 175 this->setParentSoft(PNode::getNullParent(),5); 174 176 this->searchTarget(); 175 177 } … … 195 197 // &objY, 196 198 // &objZ ); 197 // 199 //aa 198 200 // this->setAbsCoor(objX, objY, objZ); 199 201 }
Note: See TracChangeset
for help on using the changeset viewer.