[Orxonox-commit 3933] r8607 - code/branches/presentation/src/orxonox/worldentities/pawns

rgrieder at orxonox.net rgrieder at orxonox.net
Thu May 26 16:38:08 CEST 2011


Author: rgrieder
Date: 2011-05-26 16:38:07 +0200 (Thu, 26 May 2011)
New Revision: 8607

Modified:
   code/branches/presentation/src/orxonox/worldentities/pawns/SpaceShip.cc
Log:
Calling the destructor doesn't really take care of the memory deallocation :P
Also, fixed an MSCV warning with double->float.

Modified: code/branches/presentation/src/orxonox/worldentities/pawns/SpaceShip.cc
===================================================================
--- code/branches/presentation/src/orxonox/worldentities/pawns/SpaceShip.cc	2011-05-26 14:36:08 UTC (rev 8606)
+++ code/branches/presentation/src/orxonox/worldentities/pawns/SpaceShip.cc	2011-05-26 14:38:07 UTC (rev 8607)
@@ -247,7 +247,7 @@
 
     void SpaceShip::rotatePitch(const Vector2& value)
     {
-        this->localAngularAcceleration_.setX(this->localAngularAcceleration_.x() + value.x*0.8);
+        this->localAngularAcceleration_.setX(this->localAngularAcceleration_.x() + value.x*0.8f);
 
         Pawn::rotatePitch(value);
 
@@ -374,7 +374,7 @@
     void SpaceShip::removeAllEngines()
     {
         for(unsigned int i=0; i<this->engineList_.size(); i++)
-            this->engineList_[i]->~Engine();
+            this->engineList_[i]->destroy();
     }
 
     void SpaceShip::setSpeedFactor(float factor)




More information about the Orxonox-commit mailing list