Changeset 10216 for code/trunk/src/orxonox/collisionshapes
- Timestamp:
- Jan 31, 2015, 6:03:17 PM (10 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/collisionshapes/CollisionShape.cc
r9667 r10216 121 121 WorldEntityCollisionShape* parentWECCS = orxonox_cast<WorldEntityCollisionShape*>(newParent); 122 122 if (parentWECCS) 123 { 123 124 this->parentID_ = parentWECCS->getWorldEntityOwner()->getObjectID(); 124 // Else it is set to the objectID of the CompoundCollisionShape. 125 126 // If this shape is not a CompoundCollisionShape (thus an actual physical shape) & the parent is a WorldEntity's CollisionShape, 127 // set it's userPointer to the WorldEntity this CompoundCollisionShape belongs to. 128 if (!orxonox_cast<CompoundCollisionShape*>(this)) 129 this->getCollisionShape()->setUserPointer(parentWECCS->getWorldEntityOwner()); 130 } 125 131 else 132 { 133 // Else it is set to the objectID of the CompoundCollisionShape. 126 134 this->parentID_ = newParent->getObjectID(); 135 } 127 136 128 137 return true;
Note: See TracChangeset
for help on using the changeset viewer.