Changeset 6078 in orxonox.OLD for trunk/src/world_entities/weapons/projectile.cc
- Timestamp:
- Dec 13, 2005, 2:55:08 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/weapons/projectile.cc
r6074 r6078 37 37 this->lifeCycle = 0.0; 38 38 this->lifeSpan = 1.0f; /* sec */ 39 this->target.addNodeModeFlags(PNODE_PROHIBIT_DELETE_WITH_PARENT | 40 PNODE_REPARENT_TO_NULLPARENT); 41 39 this->target = NULL; 42 40 this->removeNode(); 43 41 } … … 103 101 void Projectile::setTarget(PNode* target) 104 102 { 105 this->target.setParent(target); 103 if (this->target == NULL) 104 this->target = new PNode(target, PNODE_PARENT_MODE_DEFAULT | PNODE_REPARENT_ON_PARENTS_REMOVE); 105 else 106 this->target->setParent(target); 106 107 } 107 108
Note: See TracChangeset
for help on using the changeset viewer.