Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 13, 2005, 2:55:08 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: PNode compiles again
PNode is now handled with the erase function of stl, rather than remove (which is totally the wrong way when iterating through a list and delete elements)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/weapons/guided_missile.cc

    r6074 r6078  
    150150{
    151151  //Vector v = *this->flightDirection * ( this->speed * time * 1000 + 0.1);
    152   if (target.getParent() != PNode::getNullParent())
     152  if (this->target != NULL && this->target->getParent() != PNode::getNullParent())
    153153   {
    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;
    155156     float speed = velocity.len();
    156157     if (speed > this->maxVelocity)
Note: See TracChangeset for help on using the changeset viewer.