Index: trunk/src/world_entities/creatures/fps_player.cc
===================================================================
--- trunk/src/world_entities/creatures/fps_player.cc	(revision 9003)
+++ trunk/src/world_entities/creatures/fps_player.cc	(revision 9110)
@@ -21,4 +21,6 @@
 
 #include "src/lib/util/loading/factory.h"
+
+#include "md2/md2Model.h"
 
 #include "weapons/weapon_manager.h"
@@ -28,8 +30,11 @@
 #include "weapons/fps_sniper_rifle.h"
 
+#include "aabb.h"
+
 #include "key_mapper.h"
 
 #include "debug.h"
 
+#include "shared_network_data.h"
 
 
@@ -92,4 +97,5 @@
 
   this->fallVelocity = 0.0f;
+  this->jumpForce = 0.0f;
 
   this->cameraNode.setParent(this);
@@ -123,9 +129,10 @@
 
   this->getWeaponManager().setSlotCount(2);
-  this->getWeaponManager().setSlotPosition(0, Vector(1.5, -0.7, 1.1));
 //   this->getWeaponManager().setSlotDirection(0, Quaternion(M_PI_2, Vector(0,1,0)));
   this->getWeaponManager().setSlotCapability(0, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
+  this->getWeaponManager().setSlotDirection(1, Quaternion(M_PI_4*.5, Vector(1,0,0)));
+  this->getWeaponManager().setSlotPosition(0, Vector(1.5, -0.7, 1.1));
   this->getWeaponManager().setSlotPosition(1, Vector(5.0, 0.0, 0.0));
-  this->getWeaponManager().setSlotDirection(1, Quaternion(M_PI_4*.5, Vector(1,0,0)));
+
 
   this->getWeaponManager().setParentNode(&this->cameraNode);
@@ -141,9 +148,6 @@
   registerVar( new SynchronizeableBool( &bForward, &bForward, "bForward", PERMISSION_OWNER ) );
   registerVar( new SynchronizeableBool( &bBackward, &bBackward, "bBackward", PERMISSION_OWNER ) );
-//  registerVar( new SynchronizeableQuaternion( &mouseDir, &mouseDir, "mouseDir", PERMISSION_OWNER ) );
-
-
-  // collision reaction registration
-  this->subscribeReaction(CREngine::CR_PHYSICS_GROUND_WALK, CL_BSP_ENTITY);
+  registerVar( new SynchronizeableFloat( &heading, &heading, "heading", PERMISSION_OWNER ) );
+  registerVar( new SynchronizeableFloat( &attitude, &attitude, "attitude", PERMISSION_OWNER ) );
 }
 
@@ -189,6 +193,13 @@
 
 
-  State::getCameraNode()->setRelCoor(0,0,0);
-  State::getCameraTargetNode()->setRelCoor(10,0,0);
+  AABB* box = this->getModelAABB();
+  if( box != NULL)
+  {
+    State::getCameraNode()->setRelCoor(0, box->halfLength[1] * 2.0f, 0);
+    State::getCameraTargetNode()->setRelCoor(10, box->halfLength[1] * 2.0f, 0);
+
+    this->getWeaponManager().setSlotPosition(0, Vector(1.5, box->halfLength[1] * 2.0f - 0.7, 1.1));
+    this->getWeaponManager().setSlotPosition(1, Vector(5.0, box->halfLength[1] * 2.0f, 0.0));
+  }
 }
 
@@ -207,14 +218,14 @@
 void FPSPlayer::tick (float time)
 {
-  
+
   if( this->bPosBut)
   {
     this->bPosBut = false;
-    printf("prisoner:walkTo( %f, height, %f)\n",this->getAbsCoorX(),this->getAbsCoorZ());
-  }
-  
+    printf("mechanic2:walkTo( %f, mtheight, %f)\n",this->getAbsCoorX(),this->getAbsCoorZ());
+  }
+
   Playable::tick( time );
 
-  if( ( xMouse != 0 || yMouse != 0 ) /*&& this->getOwner() == this->getHostID() */)
+  if( ( xMouse != 0 || yMouse != 0 ) && (this->getOwner() == SharedNetworkData::getInstance()->getHostID() || !State::isOnline() ) )
   {
     xMouse *= time ;
@@ -230,11 +241,9 @@
       attitude = -1.15;
 
-    this->setAbsDir(Quaternion(heading, Vector(0,1,0)));
-    this->cameraNode.setRelDir(Quaternion( attitude, Vector( 0, 0, 1 ) ));
-
     xMouse = yMouse = 0;
   }
 
- // this->setAbsDir( this->mouseDir );
+  this->setAbsDir(Quaternion(heading, Vector(0,1,0)));
+  this->cameraNode.setRelDir(Quaternion( attitude, Vector( 0, 0, 1 ) ));
 
   Vector velocity;
@@ -262,4 +271,30 @@
 
   velocity *= 100;
+
+  if( this->bJump && likely(this->getModel(0) != NULL))
+  {
+    if( this->jumpForce < 1.0f)
+    {
+      this->jumpForce = 300.0f;
+
+      if( ((InteractiveModel*)this->getModel(0))->getAnimation() != JUMP)
+        ((InteractiveModel*)this->getModel(0))->setAnimation(JUMP);
+    }
+  }
+  else if(velocity.len() != 0.0f)
+  {
+    if( ((InteractiveModel*)this->getModel(0))->getAnimation() != RUN)
+      ((InteractiveModel*)this->getModel(0))->setAnimation(RUN);
+  }
+  else
+  {
+    if( ((InteractiveModel*)this->getModel(0))->getAnimation() != STAND)
+      ((InteractiveModel*)this->getModel(0))->setAnimation(STAND);
+  }
+
+
+  velocity.y += this->jumpForce;
+  if( this->jumpForce > 1.0f)
+    this->jumpForce *= 0.9f;
 
 
@@ -287,10 +322,11 @@
   {
     ((InteractiveModel*)this->getModel(0))->tick(time);
-//
-//     // handle animations differently
-//     if( this->bJump && likely(this->getModel(0) != NULL))
-//     {
-//       ((InteractiveModel*)this->getModel(0))->setAnimation(JUMP);
-//     }
+
+    // handle animations differently
+
+
+
+
+
 //     else if( this->bFire && likely(this->getModel(0) != NULL))
 //     {
@@ -347,4 +383,5 @@
   }
   else if( event.type == KeyMapper::PEV_JUMP)
+    this->bJump = event.bPressed;
     this->bPosBut = event.bPressed;
 }
Index: trunk/src/world_entities/creatures/fps_player.h
===================================================================
--- trunk/src/world_entities/creatures/fps_player.h	(revision 9003)
+++ trunk/src/world_entities/creatures/fps_player.h	(revision 9110)
@@ -54,4 +54,5 @@
 
     float                 fallVelocity;        //!< velocity for falling down
+    float                 jumpForce;           //!< the jump force
 };
 
