Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 3, 2015, 11:47:50 AM (10 years ago)
Author:
landauf
Message:

destroy all remaining ship parts if ModularSpaceShip is destroyed.
separate ship part death effects from object deletion. ShipPart.death() creates effects, ShipPartManager destroys the instance.

File:
1 edited

Legend:

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

    r10347 r10414  
    6969        if (this->isInitialized())
    7070        {
    71 
     71            while (!this->partList_.empty())
     72                this->partList_[0]->destroy();
    7273        }
    7374    }
     
    177178            if (it->second->getName() == name)
    178179            {
    179                 it->second->setAlive(false);
     180                it->second->death();
    180181                return;
    181182            }
     
    196197            if (it->second->getName() == name)
    197198            {
    198                 it->second->setAlive(false);
     199                it->second->death();
    199200                return;
    200201            }
Note: See TracChangeset for help on using the changeset viewer.