[Orxonox-commit 3751] r8431 - code/branches/steering/src/orxonox/worldentities/pawns

mastalde at orxonox.net mastalde at orxonox.net
Mon May 9 15:56:13 CEST 2011


Author: mastalde
Date: 2011-05-09 15:56:13 +0200 (Mon, 09 May 2011)
New Revision: 8431

Modified:
   code/branches/steering/src/orxonox/worldentities/pawns/SpaceShip.cc
Log:
added lift_ and stallSpeed_ for better flight behavior without errors...

Modified: code/branches/steering/src/orxonox/worldentities/pawns/SpaceShip.cc
===================================================================
--- code/branches/steering/src/orxonox/worldentities/pawns/SpaceShip.cc	2011-05-09 13:52:35 UTC (rev 8430)
+++ code/branches/steering/src/orxonox/worldentities/pawns/SpaceShip.cc	2011-05-09 13:56:13 UTC (rev 8431)
@@ -65,7 +65,7 @@
         this->bBoostCooldown_ = false;
 
 	this->lift_ = 0.2f;
-	this->stallSpeed = 220.0f;
+	this->stallSpeed_ = 220.0f;
 
         this->bInvertYAxis_ = false;
 
@@ -103,7 +103,7 @@
         XMLPortParamVariable(SpaceShip, "boostPowerRate", boostPowerRate_, xmlelement, mode);
         XMLPortParamVariable(SpaceShip, "boostRate", boostRate_, xmlelement, mode);
         XMLPortParamVariable(SpaceShip, "boostCooldownDuration", boostCooldownDuration_, xmlelement, mode);
-	XMLPortParamVariable(SpaceShip, "float", float_, xmlelement, mode);
+	XMLPortParamVariable(SpaceShip, "lift", lift_, xmlelement, mode);
 	XMLPortParamVariable(SpaceShip, "stallSpeed", stallSpeed_, xmlelement, mode);
     }
 
@@ -174,7 +174,7 @@
                 }
             }
 	
-COUT(1) << "Vel:" << this-> getLocalVelocity().z * -1 << endl;
+//COUT(1) << "Vel:" << this-> getLocalVelocity().z * -1 << endl;
 		
         }
     }
@@ -225,7 +225,7 @@
 
 	
 	
-	if (abs(this-> getLocalVelocity().z) < stallSpeed)  {this->moveUpDown(float_*value*sqrt(abs(this-> getLocalVelocity().z)));}
+	if (abs(this-> getLocalVelocity().z) < stallSpeed_)  {this->moveUpDown(lift_*value*sqrt(abs(this-> getLocalVelocity().z)));}
 
 	
 




More information about the Orxonox-commit mailing list