Index: /branches/bsp_model/src/defs/class_id.h
===================================================================
--- /branches/bsp_model/src/defs/class_id.h	(revision 8684)
+++ /branches/bsp_model/src/defs/class_id.h	(revision 8685)
@@ -192,4 +192,5 @@
   CL_SPECTATOR                  =    0x00000360,
   CL_COLLISION_PROBE            =    0x00000361,
+  CL_FPS_PLAYER                 =    0x00000362,
 
   // Powerups
Index: /branches/bsp_model/src/lib/event/key_mapper.cc
===================================================================
--- /branches/bsp_model/src/lib/event/key_mapper.cc	(revision 8684)
+++ /branches/bsp_model/src/lib/event/key_mapper.cc	(revision 8685)
@@ -45,4 +45,5 @@
 int KeyMapper::PEV_STRAFE_LEFT       = EV_UNKNOWN;
 int KeyMapper::PEV_STRAFE_RIGHT      = EV_UNKNOWN;
+int KeyMapper::PEV_JUMP              = EV_UNKNOWN;
 
 int KeyMapper::PEV_FIRE1             = EV_UNKNOWN;
@@ -83,4 +84,5 @@
   {&KeyMapper::PEV_STRAFE_LEFT,          "StrafeLeft",                       SDLK_q},
   {&KeyMapper::PEV_STRAFE_RIGHT,         "StrafeRight",                      SDLK_e},
+  {&KeyMapper::PEV_JUMP,                 "Jump",                             SDLK_SPACE},
 
   {&KeyMapper::PEV_FIRE1,                CONFIG_NAME_PLAYER_FIRE,            EV_MOUSE_BUTTON_LEFT},
Index: /branches/bsp_model/src/lib/event/key_mapper.h
===================================================================
--- /branches/bsp_model/src/lib/event/key_mapper.h	(revision 8684)
+++ /branches/bsp_model/src/lib/event/key_mapper.h	(revision 8685)
@@ -55,4 +55,6 @@
   static int PEV_STRAFE_RIGHT;      //!< strafe right button
 
+  static int PEV_JUMP;              //!< jump
+
   static int PEV_FIRE1;             //!< fire button 1
   static int PEV_FIRE2;             //!< fire button 2
Index: /branches/bsp_model/src/lib/graphics/importer/interactive_model.h
===================================================================
--- /branches/bsp_model/src/lib/graphics/importer/interactive_model.h	(revision 8684)
+++ /branches/bsp_model/src/lib/graphics/importer/interactive_model.h	(revision 8685)
@@ -37,4 +37,5 @@
 
     virtual void setAnimation(int animNum, int playbackMode = 0) = 0;
+    virtual int getAnimation() = 0;
 };
 
Index: /branches/bsp_model/src/lib/graphics/importer/md2/md2Model.h
===================================================================
--- /branches/bsp_model/src/lib/graphics/importer/md2/md2Model.h	(revision 8684)
+++ /branches/bsp_model/src/lib/graphics/importer/md2/md2Model.h	(revision 8685)
@@ -159,5 +159,5 @@
   virtual void setAnimation(int type, int animPlayback = MD2_ANIM_LOOP);
   /**  returns the current animation @returns animation type */
-  inline int MD2Model::getAnim() { return this->animationState.type; }
+  inline int MD2Model::getAnimation() { return this->animationState.type; }
   /**  scales the current model @param scaleFactor: the factor [0..1] to use for scaling */
   void scaleModel(float scaleFactor) { this->scaleFactor = scaleFactor;}
Index: /branches/bsp_model/src/lib/graphics/importer/md3/md3_model.h
===================================================================
--- /branches/bsp_model/src/lib/graphics/importer/md3/md3_model.h	(revision 8684)
+++ /branches/bsp_model/src/lib/graphics/importer/md3/md3_model.h	(revision 8685)
@@ -45,4 +45,5 @@
 
     virtual void setAnimation(int animNum, int playbackMode = 0) {}
+    virtual int getAnimation() { return 0;}
 
     virtual void tick(float dt);
Index: /branches/bsp_model/src/world_entities/WorldEntities.am
===================================================================
--- /branches/bsp_model/src/world_entities/WorldEntities.am	(revision 8684)
+++ /branches/bsp_model/src/world_entities/WorldEntities.am	(revision 8685)
@@ -42,4 +42,5 @@
                 world_entities/space_ships/collision_probe.cc \
                 world_entities/creatures/md2_creature.cc \
+                world_entities/creatures/fps_player.cc \
                 world_entities/spectator.cc \
                 \
@@ -98,4 +99,5 @@
                 space_ships/collision_probe.cc \
                 creatures/md2_creature.h \
+                creatures/fps_player.h \
                 spectator.h \
                 \
Index: /branches/bsp_model/src/world_entities/creatures/fps_player.cc
===================================================================
--- /branches/bsp_model/src/world_entities/creatures/fps_player.cc	(revision 8685)
+++ /branches/bsp_model/src/world_entities/creatures/fps_player.cc	(revision 8685)
@@ -0,0 +1,275 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+### File Specific:
+   main-programmer: Patrick Boenzli
+   co-programmer: ...
+
+*/
+
+#include "fps_player.h"
+
+#include "interactive_model.h"
+#include "md2/md2Model.h"
+
+#include "src/lib/util/loading/factory.h"
+
+#include "key_mapper.h"
+
+
+
+CREATE_FACTORY(FPSPlayer, CL_FPS_PLAYER);
+
+
+using namespace std;
+
+
+/**
+ *  destructs the FPSPlayer, deletes alocated memory
+ */
+FPSPlayer::~FPSPlayer ()
+{
+  this->setPlayer(NULL);
+}
+
+
+/**
+ *  creates a new FPSPlayer from Xml Data
+ * @param root the xml element containing FPSPlayer data
+ *
+ */
+FPSPlayer::FPSPlayer(const TiXmlElement* root)
+{
+  this->init();
+
+  if (root != NULL)
+    this->loadParams(root);
+
+}
+
+
+/**
+ * initializes a FPSPlayer
+ */
+void FPSPlayer::init()
+{
+  this->setClassID(CL_FPS_PLAYER, "FPSPlayer");
+
+  this->getWeaponManager().changeWeaponConfig(1);
+
+  this->bLeft = false;
+  this->bRight = false;
+  this->bForward = false;
+  this->bBackward = false;
+  this->bJump = false;
+  this->xMouse = 0.0f;
+  this->yMouse = 0.0f;
+
+  this->setHealthMax(100);
+  this->setHealth(80);
+
+  this->mouseDir = this->getAbsDir();
+
+  //add events to the eventlist
+  registerEvent(KeyMapper::PEV_FORWARD);
+  registerEvent(KeyMapper::PEV_BACKWARD);
+  registerEvent(KeyMapper::PEV_LEFT);
+  registerEvent(KeyMapper::PEV_RIGHT);
+  registerEvent(KeyMapper::PEV_FIRE1);
+  registerEvent(EV_MOUSE_MOTION);
+
+  this->getWeaponManager().setSlotCount(0);
+
+  this->getWeaponManager().getFixedTarget()->setParent(this);
+  this->getWeaponManager().getFixedTarget()->setRelCoor(100000,0,0);
+
+  dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( false);
+
+
+  registerVar( new SynchronizeableBool( &bLeft, &bLeft, "bLeft", PERMISSION_OWNER ) );
+  registerVar( new SynchronizeableBool( &bRight, &bRight, "bRight", PERMISSION_OWNER ) );
+  registerVar( new SynchronizeableBool( &bForward, &bForward, "bForward", PERMISSION_OWNER ) );
+  registerVar( new SynchronizeableBool( &bBackward, &bBackward, "bBackward", PERMISSION_OWNER ) );
+  registerVar( new SynchronizeableQuaternion( &mouseDir, &mouseDir, "mouseDir", PERMISSION_OWNER ) );
+}
+
+
+/**
+ * loads the Settings of a FPSPlayer from an XML-element.
+ * @param root the XML-element to load the Spaceship's properties from
+ */
+void FPSPlayer::loadParams(const TiXmlElement* root)
+{
+  Playable::loadParams(root);
+}
+
+void FPSPlayer::setPlayDirection(const Quaternion& quat, float speed)
+{
+  this->mouseDir = quat;
+  this->angleY = quat.getHeading();
+  this->angleX = quat.getAttitude();
+}
+
+
+void FPSPlayer::reset()
+{
+  this->bLeft = false;
+  this->bRight = false;
+  this->bForward = false;
+  this->bBackward = false;
+  this->xMouse = 0.0f;
+  this->yMouse = 0.0f;
+
+  this->setHealth(80);
+}
+
+
+void FPSPlayer::enter()
+{
+  dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( false );
+  this->attachCamera();
+}
+
+void FPSPlayer::leave()
+{
+  dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( false);
+  this->detachCamera();
+}
+
+
+/**
+ *  this function is called, when two entities collide
+ * @param entity: the world entity with whom it collides
+ *
+ * Implement behaviour like damage application or other miscellaneous collision stuff in this function
+ * @todo dont let FPSPlayer fly through walls
+ */
+void FPSPlayer::collidesWith(WorldEntity* entity, const Vector& location)
+{
+}
+
+
+
+/**
+ *  the function called for each passing timeSnap
+ * @param time The timespan passed since last update
+ */
+void FPSPlayer::tick (float time)
+{
+  Playable::tick( time );
+
+  if( ( xMouse != 0 || yMouse != 0 ) && this->getOwner() == this->getHostID() )
+  {
+    xMouse *= time / 10;
+    yMouse *= time / 10;
+
+    angleX -= xMouse;
+    angleY -= yMouse;
+
+    if ( angleY > 2.05 )
+      angleY = 2.05;
+
+    if ( angleY < -1.15 )
+      angleY = -1.15;
+
+    this->mouseDir = Quaternion( angleX, Vector( 0, 1, 0 ) ) * Quaternion( angleY, Vector( 0, 0, 1 ) );
+
+    xMouse = yMouse = 0;
+  }
+
+  this->setAbsDir( this->mouseDir );
+
+  Vector velocity;
+
+  if ( this->bForward )
+  {
+    velocity += this->getAbsDirX();
+  }
+
+  if ( this->bBackward )
+  {
+    velocity -= this->getAbsDirX();
+  }
+
+  if ( this->bRight )
+  {
+    velocity += this->getAbsDirZ();
+  }
+
+  if ( this->bLeft )
+  {
+    velocity -= this->getAbsDirZ();
+  }
+
+  velocity *= 100;
+
+  this->shiftCoor( velocity*time );
+
+
+
+
+  if( likely(this->getModel(0) != NULL) && this->getModel(0)->isA(CL_INTERACTIVE_MODEL))
+  {
+    ((InteractiveModel*)this->getModel(0))->tick(time);
+
+    // handle animations differently
+    if( this->bJump && likely(this->getModel(0) != NULL))
+    {
+      ((InteractiveModel*)this->getModel(0))->setAnimation(JUMP);
+    }
+//     else if( this->bFire && likely(this->getModel(0) != NULL))
+//     {
+//       if( ((InteractiveModel*)this->getModel(0))->getAnim() != ATTACK)
+//         ((InteractiveModel*)this->getModel(0))->setAnimation(ATTACK);
+//     }
+//     else if( fabs(move.len()) > 0.0f && likely(this->getModel(0) != NULL))
+//     {
+//       if( ((InteractiveModel*)this->getModel(0))->getAnim() != RUN)
+//         ((InteractiveModel*)this->getModel(0))->setAnimation(RUN);
+//     }
+    else if (likely(this->getModel(0) != NULL))
+    {
+      if( ((InteractiveModel*)this->getModel(0))->getAnimation() != STAND)
+        ((InteractiveModel*)this->getModel(0))->setAnimation(STAND);
+    }
+  }
+
+}
+
+
+
+
+
+
+/**
+ *
+ */
+void FPSPlayer::process(const Event &event)
+{
+  Playable::process(event);
+
+  if( event.type == KeyMapper::PEV_LEFT)
+    this->bLeft = event.bPressed;
+  else if( event.type == KeyMapper::PEV_RIGHT)
+    this->bRight = event.bPressed;
+  else if( event.type == KeyMapper::PEV_FORWARD)
+    this->bForward = event.bPressed; //this->shiftCoor(0,.1,0);
+  else if( event.type == KeyMapper::PEV_BACKWARD)
+    this->bBackward = event.bPressed; //this->shiftCoor(0,-.1,0);
+  else if( event.type == EV_MOUSE_MOTION)
+  {
+    this->xMouse += event.xRel;
+    this->yMouse += event.yRel;
+  }
+}
+
+
+
+
Index: /branches/bsp_model/src/world_entities/creatures/fps_player.h
===================================================================
--- /branches/bsp_model/src/world_entities/creatures/fps_player.h	(revision 8685)
+++ /branches/bsp_model/src/world_entities/creatures/fps_player.h	(revision 8685)
@@ -0,0 +1,52 @@
+/*!
+ * @file fps_player.h
+ * Implements a playable for fps games
+ */
+
+#ifndef _FPS_PLAYER_H
+#define _FPS_PLAYER_H
+
+
+#include "playable.h"
+
+
+class FPSPlayer : public Playable
+{
+
+  public:
+    FPSPlayer(const TiXmlElement* root = NULL);
+    virtual ~FPSPlayer();
+
+    virtual void loadParams(const TiXmlElement* root);
+
+    virtual void setPlayDirection(const Quaternion& rot, float speed = 0.0f);
+
+    virtual void enter();
+    virtual void leave();
+
+    virtual void reset();
+
+    virtual void collidesWith(WorldEntity* entity, const Vector& location);
+    virtual void tick(float time);
+
+    virtual void process(const Event &event);
+
+  private:
+    void init();
+
+    bool                  bLeft;
+    bool                  bRight;
+    bool                  bForward;
+    bool                  bBackward;
+    bool                  bJump;              //!< jumping
+
+    float                 xMouse;             //!< mouse moved in x-Direction
+    float                 yMouse;             //!< mouse moved in y-Direction
+    Quaternion            mouseDir;           //!< the direction where the player wants to fly
+
+    float                 angleX;
+    float                 angleY;
+
+};
+
+#endif
Index: /branches/bsp_model/src/world_entities/creatures/md2_creature.cc
===================================================================
--- /branches/bsp_model/src/world_entities/creatures/md2_creature.cc	(revision 8684)
+++ /branches/bsp_model/src/world_entities/creatures/md2_creature.cc	(revision 8685)
@@ -262,15 +262,15 @@
   else if( this->bFire && likely(this->getModel(0) != NULL))
   {
-    if( ((MD2Model*)this->getModel(0))->getAnim() != ATTACK)
+    if( ((MD2Model*)this->getModel(0))->getAnimation() != ATTACK)
       ((MD2Model*)this->getModel(0))->setAnimation(ATTACK);
   }
   else if( fabs(move.len()) > 0.0f && likely(this->getModel(0) != NULL))
   {
-    if( ((MD2Model*)this->getModel(0))->getAnim() != RUN)
+    if( ((MD2Model*)this->getModel(0))->getAnimation() != RUN)
       ((MD2Model*)this->getModel(0))->setAnimation(RUN);
   }
   else if (likely(this->getModel(0) != NULL))
   {
-    if( ((MD2Model*)this->getModel(0))->getAnim() != STAND)
+    if( ((MD2Model*)this->getModel(0))->getAnimation() != STAND)
       ((MD2Model*)this->getModel(0))->setAnimation(STAND);
   }
