[Orxonox-commit 2156] r6872 - in code/branches/fps: data/levels data/levels/old data/levels/templates src/orxonox/worldentities/pawns

edwind at orxonox.net edwind at orxonox.net
Mon May 10 14:20:21 CEST 2010


Author: edwind
Date: 2010-05-10 14:20:21 +0200 (Mon, 10 May 2010)
New Revision: 6872

Modified:
   code/branches/fps/data/levels/fps_test.oxw
   code/branches/fps/data/levels/old/physicstest2.oxw
   code/branches/fps/data/levels/templates/fps.oxt
   code/branches/fps/src/orxonox/worldentities/pawns/FpsPlayer.cc
   code/branches/fps/src/orxonox/worldentities/pawns/FpsPlayer.h
Log:
commit by ed

Modified: code/branches/fps/data/levels/fps_test.oxw
===================================================================
--- code/branches/fps/data/levels/fps_test.oxw	2010-05-10 12:07:41 UTC (rev 6871)
+++ code/branches/fps/data/levels/fps_test.oxw	2010-05-10 12:20:21 UTC (rev 6872)
@@ -20,7 +20,7 @@
   >
     <Light type=directional position="0,-100000,0" direction="0.02, -1, 0.05" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
 
-  <StaticEntity position="0,-10000,0" direction="0,-1,0" collisionType=static mass=100000 >
+  <StaticEntity position="0,-10000,0" direction="0,-1,2" collisionType=static mass=100000 friction=0.01 >
       <attached>
         <Model position="0,0,0" mesh="cube.mesh" scale3D="10000,10000,1000" />
       </attached>

Modified: code/branches/fps/data/levels/old/physicstest2.oxw
===================================================================
--- code/branches/fps/data/levels/old/physicstest2.oxw	2010-05-10 12:07:41 UTC (rev 6871)
+++ code/branches/fps/data/levels/old/physicstest2.oxw	2010-05-10 12:20:21 UTC (rev 6872)
@@ -12,6 +12,7 @@
   <Scene
    ambientlight = "0.5, 0.5, 0.5"
    skybox       = "Orxonox/Starbox"
+   gravity      = "0,-50,0"
    negativeWorldRange = "(-100000, -100000, -100000)"
    positiveWorldRange = "( 100000,  100000,  100000)"
    hasPhysics   = true

Modified: code/branches/fps/data/levels/templates/fps.oxt
===================================================================
--- code/branches/fps/data/levels/templates/fps.oxt	2010-05-10 12:07:41 UTC (rev 6871)
+++ code/branches/fps/data/levels/templates/fps.oxt	2010-05-10 12:20:21 UTC (rev 6872)
@@ -11,14 +11,15 @@
    maxhealth         = 200
    initialhealth     = 100
 
-   primaryThrust     = 100;
-   auxilaryThrust    = 30;
-   rotationThrust    = 25;
+   primaryThrust     = 0;
+   auxilaryThrust    = 0;
+   rotationThrust    = 0;
 
    collisionType     = "dynamic"
    mass              = 100
    linearDamping     = 0.7
    angularDamping    = 0.9999999
+   friction	     = 0.01
   >
  <!--   <attached>
       <Model position="0,0,0" yaw=90 pitch=-90 roll=0 scale=4 mesh="assff.mesh" />

Modified: code/branches/fps/src/orxonox/worldentities/pawns/FpsPlayer.cc
===================================================================
--- code/branches/fps/src/orxonox/worldentities/pawns/FpsPlayer.cc	2010-05-10 12:07:41 UTC (rev 6871)
+++ code/branches/fps/src/orxonox/worldentities/pawns/FpsPlayer.cc	2010-05-10 12:20:21 UTC (rev 6872)
@@ -78,6 +78,7 @@
 
         this->setConfigValues();
         this->registerVariables();
+	
     }
 
     FpsPlayer::~FpsPlayer()
@@ -121,7 +122,8 @@
     {
         if (this->hasLocalController())
         {
-           
+            this->setOrientation(savedOrientation_);
+	    
 	    thistickboost=false;
 	    
 	    float localSpeedSquared = this->localVelocity_.squaredLength();
@@ -149,6 +151,11 @@
             }
 
             this->yaw_ = this->pitch_ = this->roll_ = 0;
+	    
+	    //Quaternion q=this->getOrientation();
+	    //if( q.y<0.99 ) this->setOrientation(q.w, q.x, 1.0, q.z);
+	    this->setAngularVelocity(0.0, 0.0, 0.0);
+	    savedOrientation_=this->getOrientation();
         }
 
         SUPER(FpsPlayer, tick, dt);

Modified: code/branches/fps/src/orxonox/worldentities/pawns/FpsPlayer.h
===================================================================
--- code/branches/fps/src/orxonox/worldentities/pawns/FpsPlayer.h	2010-05-10 12:07:41 UTC (rev 6871)
+++ code/branches/fps/src/orxonox/worldentities/pawns/FpsPlayer.h	2010-05-10 12:20:21 UTC (rev 6872)
@@ -87,6 +87,7 @@
             Vector3 localVelocity_;
 	    bool isfloor;
 	    bool thistickboost;
+	    Quaternion savedOrientation_;
     };
 }
 




More information about the Orxonox-commit mailing list