- Timestamp:
- Jan 26, 2015, 12:22:57 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentationFS14/src/orxonox/collisionshapes/CollisionShape.cc
r9667 r10205 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.