Index: /orxonox/trunk/src/Makefile.am
===================================================================
--- /orxonox/trunk/src/Makefile.am	(revision 3470)
+++ /orxonox/trunk/src/Makefile.am	(revision 3471)
@@ -1,3 +1,3 @@
-AM_CXXFLAGS="-I./world_entity"
+AM_CXXFLAGS="-I./world_entities"
 AM_LDFLAGS= $(MWINDOWS)
 
@@ -9,5 +9,5 @@
 orxonox_SOURCES= orxonox.cc \
 		 world.cc \
-		 world_entity/player.cc \
+		 world_entities/player.cc \
 		 collision.cc \
 		 data_tank.cc \
@@ -53,5 +53,5 @@
 		 base_entity.h \
 		 error.h \
-		 world_entity/player.h \
+		 world_entities/player.h \
 		 camera.h \
 		 ini_parser.h \
Index: /orxonox/trunk/src/Makefile.in
===================================================================
--- /orxonox/trunk/src/Makefile.in	(revision 3470)
+++ /orxonox/trunk/src/Makefile.in	(revision 3471)
@@ -214,9 +214,9 @@
 target_os = @target_os@
 target_vendor = @target_vendor@
-AM_CXXFLAGS = "-I./world_entity"
+AM_CXXFLAGS = "-I./world_entities"
 AM_LDFLAGS = $(MWINDOWS)
 orxonox_SOURCES = orxonox.cc \
 		 world.cc \
-		 world_entity/player.cc \
+		 world_entities/player.cc \
 		 collision.cc \
 		 data_tank.cc \
@@ -262,5 +262,5 @@
 		 base_entity.h \
 		 error.h \
-		 world_entity/player.h \
+		 world_entities/player.h \
 		 camera.h \
 		 ini_parser.h \
@@ -423,19 +423,19 @@
 @am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
 
-player.o: world_entity/player.cc
-@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT player.o -MD -MP -MF "$(DEPDIR)/player.Tpo" -c -o player.o `test -f 'world_entity/player.cc' || echo '$(srcdir)/'`world_entity/player.cc; \
+player.o: world_entities/player.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT player.o -MD -MP -MF "$(DEPDIR)/player.Tpo" -c -o player.o `test -f 'world_entities/player.cc' || echo '$(srcdir)/'`world_entities/player.cc; \
 @am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/player.Tpo" "$(DEPDIR)/player.Po"; else rm -f "$(DEPDIR)/player.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='world_entity/player.cc' object='player.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='world_entities/player.cc' object='player.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/player.Po' tmpdepfile='$(DEPDIR)/player.TPo' @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o player.o `test -f 'world_entity/player.cc' || echo '$(srcdir)/'`world_entity/player.cc
-
-player.obj: world_entity/player.cc
-@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT player.obj -MD -MP -MF "$(DEPDIR)/player.Tpo" -c -o player.obj `if test -f 'world_entity/player.cc'; then $(CYGPATH_W) 'world_entity/player.cc'; else $(CYGPATH_W) '$(srcdir)/world_entity/player.cc'; fi`; \
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o player.o `test -f 'world_entities/player.cc' || echo '$(srcdir)/'`world_entities/player.cc
+
+player.obj: world_entities/player.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT player.obj -MD -MP -MF "$(DEPDIR)/player.Tpo" -c -o player.obj `if test -f 'world_entities/player.cc'; then $(CYGPATH_W) 'world_entities/player.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/player.cc'; fi`; \
 @am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/player.Tpo" "$(DEPDIR)/player.Po"; else rm -f "$(DEPDIR)/player.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='world_entity/player.cc' object='player.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='world_entities/player.cc' object='player.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/player.Po' tmpdepfile='$(DEPDIR)/player.TPo' @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o player.obj `if test -f 'world_entity/player.cc'; then $(CYGPATH_W) 'world_entity/player.cc'; else $(CYGPATH_W) '$(srcdir)/world_entity/player.cc'; fi`
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o player.obj `if test -f 'world_entities/player.cc'; then $(CYGPATH_W) 'world_entities/player.cc'; else $(CYGPATH_W) '$(srcdir)/world_entities/player.cc'; fi`
 
 model.o: importer/model.cc
@@ -657,5 +657,5 @@
 
 distdir: $(DISTFILES)
-	$(mkdir_p) $(distdir)/sfont $(distdir)/world_entity
+	$(mkdir_p) $(distdir)/sfont $(distdir)/world_entities
 	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
Index: /orxonox/trunk/src/world_entities/player.cc
===================================================================
--- /orxonox/trunk/src/world_entities/player.cc	(revision 3471)
+++ /orxonox/trunk/src/world_entities/player.cc	(revision 3471)
@@ -0,0 +1,211 @@
+
+
+/* 
+   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: Christian Meyer
+*/
+
+#include "player.h"
+#include "stdincl.h"
+#include "collision.h"
+#include "importer/objModel.h"
+
+using namespace std;
+
+/**
+   \brief creates a new Player
+   \param isFree if the player is free
+*/
+Player::Player(bool isFree) : WorldEntity(isFree)
+{
+
+  this->model = new OBJModel("../data/models/reaplow.obj");
+  /*
+  objectList = glGenLists(1);
+  glNewList (objectList, GL_COMPILE);
+
+  glBegin(GL_TRIANGLES);
+  glColor3f(1,1,1);
+  glVertex3f(0,0,0.5);
+  glVertex3f(-0.5,0,-1);
+  glVertex3f(0.5,0,-1);
+
+  glVertex3f(0,0,0.5);
+  glVertex3f(0,0.5,-1);
+  glVertex3f(0,-0.5,-1);
+  glEnd();
+    
+  glBegin(GL_QUADS);
+  glColor3f(0,0,1);
+  glVertex3f(0.5,0.5,-1);
+  glVertex3f(0.5,-0.5,-1);
+  glVertex3f(-0.5,-0.5,-1);
+  glVertex3f(-0.5,0.5,-1);
+  glEnd();
+  
+  glEndList ();
+  */
+}
+
+/**
+   \brief destructs the player
+*/
+Player::~Player ()
+{
+  delete this->model;
+}
+
+/**
+   \brief effect that occurs after the player is spawned
+*/
+void Player::postSpawn ()
+{
+  travelSpeed = 15.0;
+  velocity = Vector();
+  bUp = bDown = bLeft = bRight = bAscend = bDescend = false;
+  bFire = false;
+  acceleration = 10.0;
+  setCollision(new CollisionCluster(1.0, Vector(0,0,0)));
+}
+
+/**
+   \brief the function called for each passing timeSnap
+   \param time The timespan passed since last update
+*/
+void Player::tick (float time)
+{
+  // movement
+  this->move (time);
+}
+
+/**
+   \brief if the player is hit, call this function
+   \param weapon hit by this weapon
+   \param loc ??
+*/
+void Player::hit (WorldEntity* weapon, Vector loc)
+{
+}
+
+/**
+   \brief action that happens when the player is destroyed.
+*/
+void Player::destroy ()
+{
+}
+
+/** 
+    \brief Collision with another Entity has this effect
+    \param other the other colider
+    \param ownhitflags ??
+    \param otherhitflags ??
+*/
+void Player::collide (WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags)
+{
+}
+
+/**
+   \brief The connection to the command node
+   \param cmd the Command unit from witch to map
+
+   here the commands are mapped to the players movement/weaponary
+*/
+void Player::command (Command* cmd)
+{
+  //printf("Player|recieved command [%s]\n", cmd->cmd);
+  if( !strcmp( cmd->cmd, "up")) bUp = !cmd->bUp;
+  else if( !strcmp( cmd->cmd, "down")) bDown = !cmd->bUp;
+  else if( !strcmp( cmd->cmd, "left")) bLeft = !cmd->bUp;
+  else if( !strcmp( cmd->cmd, "right")) bRight = !cmd->bUp;
+  else if( !strcmp( cmd->cmd, "fire")) bFire = !cmd->bUp;
+}
+
+/**
+   \brief draws the player after transforming him.
+*/
+void Player::draw ()
+{ 
+  glMatrixMode(GL_MODELVIEW);
+  glLoadIdentity();
+  float matrix[4][4];
+  
+  /* translate */
+  glTranslatef (this->getAbsCoor ().x, 
+		this->getAbsCoor ().y, 
+		this->getAbsCoor ().z);
+  /* rotate */
+  this->getAbsDir ().matrix (matrix);
+  glMultMatrixf((float*)matrix);
+  
+  glMatrixMode(GL_MODELVIEW);
+  this->model->draw();
+  // glCallList(objectList);
+}
+
+
+/*PN
+  void Player::getLookat(Location* locbuf)
+  {
+  *locbuf = *getLocation();
+  //locbuf->dist += 5.0;
+  }
+*/
+
+/**
+   \brief the action occuring if the player left the game
+*/
+void Player::leftWorld ()
+{
+}
+
+/**
+   \brief action if player moves
+   \param time the timeslice since the last frame
+*/
+void Player::move (float time)
+{
+  Vector accel(0.0, 0.0, 0.0);
+  /* FIXME: calculating the direction and orthDirection every timeSlice is redundant! save it somewhere */
+  //Placement *pos = getPlacement();
+  
+  /* calculate the direction in which the craft is heading  */
+  Vector direction (1.0, 0.0, 0.0);
+  //direction = this->absDirection.apply (direction);
+  Vector orthDirection (0.0, 0.0, 1.0);
+  //orthDirection = orthDirection.cross (direction);
+
+  if( bUp) { accel = accel+(direction*acceleration); }
+  if( bDown) { accel = accel-(direction*acceleration); }
+  if( bLeft ) { accel = accel - (orthDirection*acceleration); }
+  if( bRight ) { accel = accel + (orthDirection*acceleration); }
+  if( bAscend ) { /* not yet implemented but just: (0,0,1)*acceleration */}
+  if( bDescend) {/* FIXME */} /* \todo up and down player movement */
+
+  //Location* l = getLocation();
+  
+  // r(t) = r(0) + v(0)*t + 1/2*a*t^2
+  // r = position
+  // v = velocity
+  // a = acceleration
+
+  /* this the base-speed of the player: determines how fast and how the player follows the track*/
+  //l->dist = l->dist + travelSpeed * time;
+  
+  Vector* shift = new Vector (this->travelSpeed * time, 0, 0);
+  this->shiftCoor (shift);
+  
+  /* this updates the player position on the track - user interaction */
+  //l->pos = l->pos + accel*time;
+  Vector move = accel * time;
+  this->shiftCoor (&move);
+}
Index: /orxonox/trunk/src/world_entities/player.h
===================================================================
--- /orxonox/trunk/src/world_entities/player.h	(revision 3471)
+++ /orxonox/trunk/src/world_entities/player.h	(revision 3471)
@@ -0,0 +1,51 @@
+/*! 
+    \file player.h
+    \brief Implements a basic controllable WorldEntity
+*/
+
+#ifndef _PLAYER_H
+#define _PLAYER_H
+
+#include "world_entity.h"
+
+class OBJModel;
+
+//! Basic controllable WorldEntity
+class Player : public WorldEntity 
+{
+  friend class World;
+  
+ public:
+  Player(bool isFree = false);
+  ~Player();
+  
+  virtual void postSpawn();
+  virtual void tick(float time);
+  virtual void hit(WorldEntity* weapon, Vector loc);
+  virtual void destroy();
+  virtual void collide(WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags);
+  virtual void command(Command* cmd);
+  
+  virtual void draw();
+  // virtual void getLookat(Location* locbuf);
+  
+  virtual void leftWorld();
+  
+ private:
+  bool bUp;              //!< up button pressed.
+  bool bDown;            //!< down button pressed.
+  bool bLeft;            //!< left button pressed.
+  bool bRight;           //!< right button pressed.
+  bool bAscend;          //!< ascend button pressed.
+  bool bDescend;         //!< descend button presses.
+  bool bFire;            //!< fire button pressed.
+
+  Vector velocity;       //!< the velocity of the player.
+  float travelSpeed;     //!< the current speed of the player (to make soft movement)
+  float acceleration;    //!< the acceleration of the player.
+  
+  void move(float time);
+  
+};
+
+#endif /* _PLAYER_H */
