[Orxonox-commit 3827] r8503 - code/branches/bigships/src/orxonox/worldentities/pawns
dafrick at orxonox.net
dafrick at orxonox.net
Wed May 18 12:54:25 CEST 2011
Author: dafrick
Date: 2011-05-18 12:54:25 +0200 (Wed, 18 May 2011)
New Revision: 8503
Modified:
code/branches/bigships/src/orxonox/worldentities/pawns/SpaceShip.cc
Log:
Values that are needed in the destructor need to be initialized before RegisterObject(...) is executed, because when the class hierarchy is created an object of each class is created and destroyed when RegisterObject(...) is executed.
Modified: code/branches/bigships/src/orxonox/worldentities/pawns/SpaceShip.cc
===================================================================
--- code/branches/bigships/src/orxonox/worldentities/pawns/SpaceShip.cc 2011-05-18 10:36:59 UTC (rev 8502)
+++ code/branches/bigships/src/orxonox/worldentities/pawns/SpaceShip.cc 2011-05-18 10:54:25 UTC (rev 8503)
@@ -45,7 +45,7 @@
const float orientationGain = 100;
CreateFactory(SpaceShip);
- SpaceShip::SpaceShip(BaseObject* creator) : Pawn(creator)
+ SpaceShip::SpaceShip(BaseObject* creator) : Pawn(creator), boostBlur_(NULL)
{
RegisterObject(SpaceShip);
@@ -58,8 +58,6 @@
this->bBoost_ = false;
this->steering_ = Vector3::ZERO;
//this->engine_ = 0;
-
- this->boostBlur_ = 0;
this->boostPower_ = 10.0f;
this->initialBoostPower_ = 10.0f;
More information about the Orxonox-commit
mailing list