Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10205


Ignore:
Timestamp:
Jan 26, 2015, 12:22:57 AM (5 years ago)
Author:
landauf
Message:

the previous commit was not correct. re-added the call to setUserPointer, but I may have found a better place for it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentationFS14/src/orxonox/collisionshapes/CollisionShape.cc

    r9667 r10205  
    121121        WorldEntityCollisionShape* parentWECCS = orxonox_cast<WorldEntityCollisionShape*>(newParent);
    122122        if (parentWECCS)
     123        {
    123124            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        }
    125131        else
     132        {
     133            // Else it is set to the objectID of the CompoundCollisionShape.
    126134            this->parentID_ = newParent->getObjectID();
     135        }
    127136
    128137        return true;
Note: See TracChangeset for help on using the changeset viewer.