[Orxonox-commit 2365] r7080 - code/branches/presentation3/src/orxonox/worldentities/pawns
landauf at orxonox.net
landauf at orxonox.net
Wed Jun 2 02:16:12 CEST 2010
Author: landauf
Date: 2010-06-02 02:16:11 +0200 (Wed, 02 Jun 2010)
New Revision: 7080
Modified:
code/branches/presentation3/src/orxonox/worldentities/pawns/FpsPlayer.cc
Log:
fixed bug in FpsPlayer, weaponNode wasn't destroyed. this fixes a crash after unloading an fps level.
Modified: code/branches/presentation3/src/orxonox/worldentities/pawns/FpsPlayer.cc
===================================================================
--- code/branches/presentation3/src/orxonox/worldentities/pawns/FpsPlayer.cc 2010-06-01 23:58:37 UTC (rev 7079)
+++ code/branches/presentation3/src/orxonox/worldentities/pawns/FpsPlayer.cc 2010-06-02 00:16:11 UTC (rev 7080)
@@ -92,8 +92,14 @@
FpsPlayer::~FpsPlayer()
{
- if (this->isInitialized() && this->mesh_.getEntity())
- this->detachOgreObject(this->mesh_.getEntity());
+ if (this->isInitialized())
+ {
+ if (this->mesh_.getEntity())
+ this->detachOgreObject(this->mesh_.getEntity());
+
+ if (this->weaponNode_ && this->getScene()->getSceneManager())
+ this->getScene()->getSceneManager()->destroySceneNode(this->weaponNode_->getName());
+ }
}
void FpsPlayer::XMLPort(Element& xmlelement, XMLPort::Mode mode)
More information about the Orxonox-commit
mailing list