Changeset 6078 in orxonox.OLD for trunk/src/world_entities/weapons/guided_missile.cc
- Timestamp:
- Dec 13, 2005, 2:55:08 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/weapons/guided_missile.cc
r6074 r6078 150 150 { 151 151 //Vector v = *this->flightDirection * ( this->speed * time * 1000 + 0.1); 152 if (t arget.getParent() != PNode::getNullParent())152 if (this->target != NULL && this->target->getParent() != PNode::getNullParent()) 153 153 { 154 velocity += ((target.getAbsCoor() - this->getAbsCoor()).getNormalized())*agility; 154 printf("========%s::%s\n", target->getParent()->getClassName(), target->getParent()->getName() ); 155 velocity += ((target->getAbsCoor() - this->getAbsCoor()).getNormalized())*agility; 155 156 float speed = velocity.len(); 156 157 if (speed > this->maxVelocity)
Note: See TracChangeset
for help on using the changeset viewer.