Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2477


Ignore:
Timestamp:
Dec 15, 2008, 11:21:10 PM (16 years ago)
Author:
rgrieder
Message:

Bugfix for the server crash when the client leaves.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation/src/orxonox/objects/collisionshapes/CompoundCollisionShape.cc

    r2469 r2477  
    5454        if (this->isInitialized())
    5555        {
    56             // Detatch all children first
    57             this->removeAllChildShapes();
     56            // Notify children about removal
     57            for (std::map<CollisionShape*, btCollisionShape*>::iterator it = this->childShapes_.begin();
     58                it != this->childShapes_.end(); ++it)
     59            {
     60                it->first->setParent(0, OBJECTID_UNKNOWN);
     61            }
     62
    5863            delete this->compoundShape_;
    5964        }
Note: See TracChangeset for help on using the changeset viewer.