Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 8, 2014, 4:20:26 PM (11 years ago)
Author:
noep
Message:

Added PartDestructionEvent, possibly fixed one out of two runtimeerrors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/modularships/src/orxonox/worldentities/pawns/ModularSpaceShip.cc

    r10036 r10052  
    303303        }
    304304        // Remove the part-entity assignment and detach the Entity of this ShipPart
    305         for (std::map<StaticEntity*, ShipPart*>::iterator itt = this->partMap_.begin(); itt != this->partMap_.end(); ++itt)
     305        for (std::map<StaticEntity*, ShipPart*>::iterator itt = this->partMap_.begin(); itt != this->partMap_.end(); )
    306306        {
    307307            if (itt->second == part)
     
    314314                //itt->first->setCollisionType(None);
    315315                //itt->first->deactivatePhysics();
    316                 this->partMap_.erase(itt);
     316                this->partMap_.erase(itt++);
     317            } else {
     318                ++itt;
    317319            }
    318320        }
Note: See TracChangeset for help on using the changeset viewer.