Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 2, 2010, 2:16:11 AM (14 years ago)
Author:
landauf
Message:

fixed bug in FpsPlayer, weaponNode wasn't destroyed. this fixes a crash after unloading an fps level.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation3/src/orxonox/worldentities/pawns/FpsPlayer.cc

    r7075 r7080  
    9393    FpsPlayer::~FpsPlayer()
    9494    {
    95         if (this->isInitialized() && this->mesh_.getEntity())
    96             this->detachOgreObject(this->mesh_.getEntity());
     95        if (this->isInitialized())
     96        {
     97            if (this->mesh_.getEntity())
     98                this->detachOgreObject(this->mesh_.getEntity());
     99
     100            if (this->weaponNode_ && this->getScene()->getSceneManager())
     101                this->getScene()->getSceneManager()->destroySceneNode(this->weaponNode_->getName());
     102        }
    97103    }
    98104
Note: See TracChangeset for help on using the changeset viewer.