Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 11, 2005, 6:23:42 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: multiple new Reparenting modes in PNode.
Testing the stuff in GuidedMissile
Projectile has a PNode as reference not as pointer
some minor weapon changes

File:
1 edited

Legend:

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

    r5994 r6054  
    3838  this->lifeCycle = 0.0;
    3939  this->lifeSpan = 1.0f; /* sec */
    40   this->target = NULL;
     40  this->target.addNodeModeFlags(PNODE_PROHIBIT_DELETE_WITH_PARENT |
     41                                PNODE_REPARENT_TO_NULLPARENT);
    4142
    4243  this->removeNode();
     
    103104void Projectile::setTarget(PNode* target)
    104105{
    105 
    106   if (this->target == NULL)
    107      this->target = new PNode();
    108   this->target->setParent(target);
     106  this->target.setParent(target);
    109107}
    110108
Note: See TracChangeset for help on using the changeset viewer.