Index: code/branches/network/bin/levels/sample.oxw
===================================================================
--- code/branches/network/bin/levels/sample.oxw	(revision 887)
+++ code/branches/network/bin/levels/sample.oxw	(revision 888)
@@ -1,4 +1,4 @@
 <!--
- <audio>sdfasdfasd
+ <audio>
 		<ambient>
 			<ogg src="allgorythm-lift_up" />
@@ -15,5 +15,5 @@
 
 <!--Fighter camera="true" position="0,0,0" scale="10" yawpitchroll="-90,-90,0" mesh="assf3.mesh"  forward="500" rotateupdown="200" rotaterightleft="200" looprightleft="200" /-->
-<SpaceShip camera="true" position="0,0,0" scale="10" yawpitchroll="-90,-90,0" mesh="assf5.mesh" maxSpeed="500" maxSideAndBackSpeed="50" maxRotation="1.0" transAcc="200" rotAcc="3.0" transDamp="75" rotDamp="1.0" />
+<SpaceShip camera="true" position="0,0,0" scale="10" yawpitchroll="-90,-90,0" mesh="assf3.mesh" maxSpeed="500" maxSideAndBackSpeed="50" maxRotation="1.0" transAcc="200" rotAcc="3.0" transDamp="75" rotDamp="1.0" />
 
 <NPC position="0,100,400" scale="1" mesh="razor.mesh"/>
@@ -23,6 +23,6 @@
 <NPC position="100,0,400" scale="1" mesh="razor.mesh"/>
 
-<Model name="starship" position="200,0,500" scale="10" mesh="starship.mesh" yawpitchroll="-90,-90,0" />
-<Model name="drone" position="-200,0,500" scale="10" mesh="drone.mesh" yawpitchroll="-90,-90,0">
+<!--Model name="starship" position="200,0,500" scale="10" mesh="starship.mesh" yawpitchroll="-90,-90,0" /-->
+<!--Model name="drone" position="-200,0,500" scale="10" mesh="drone.mesh" yawpitchroll="-90,-90,0">
   <attached>
     <Model name="drone2" position="200,-100,-500" scale="10" mesh="drone.mesh" yawpitchroll="-90,-90,0">
@@ -32,5 +32,5 @@
     </Model>
   </attached>
-</Model>
+</Model -->
 
 <Model position="-200,1000,500" scale="10" mesh="hoover_body.mesh" yawpitchroll="-90,-90,0" />
Index: code/branches/network/src/network/Client.h
===================================================================
--- code/branches/network/src/network/Client.h	(revision 887)
+++ code/branches/network/src/network/Client.h	(revision 888)
@@ -16,4 +16,6 @@
 #include <string>
 
+#include "orxonox/objects/Tickable.h"
+
 #include "NetworkPrereqs.h"
 #include "ClientConnection.h"
@@ -21,4 +23,5 @@
 #include "GameStateClient.h"
 //#include "NetworkFrameListener.h"
+
 
 
@@ -32,5 +35,5 @@
   *
   */
-  class _NetworkExport Client : PacketDecoder{
+  class _NetworkExport Client : PacketDecoder, public orxonox::Tickable{
   public:
     Client();
Index: code/branches/network/src/network/ConnectionManager.cc
===================================================================
--- code/branches/network/src/network/ConnectionManager.cc	(revision 887)
+++ code/branches/network/src/network/ConnectionManager.cc	(revision 888)
@@ -281,3 +281,34 @@
   }
 
+  
+  
+  void ConnectionManager::addClientsObjectID( int clientID, int objectID ) {
+    COUT(4) << "ship of client: " << clientID << ": " << objectID << " mapped" << std::endl;
+    clientsShip.insert( std::make_pair( clientID, objectID ) );
+  }
+
+  int ConnectionManager::getClientsShipID( int clientID ) {
+    return clientsShip[clientID];
+  }
+
+  int ConnectionManager::getObjectsClientID( int objectID ) {
+    std::map<int, int>::iterator iter = clientsShip.begin();
+    while( iter != clientsShip.end() ) {
+      if( iter->second == objectID ) return iter->first;
+    }
+    return -99;
+  }
+
+  void ConnectionManager::deleteClientIDReg( int clientID ) {
+    clientsShip.erase( clientID );
+  }
+
+  void ConnectionManager::deleteObjectIDReg( int objectID ) {
+    std::map<int, int>::iterator iter = clientsShip.begin();
+    while( iter != clientsShip.end() ) {
+      if( iter->second == objectID ) break; 
+    }
+    clientsShip.erase( iter->first );
+  }
+  
 }
Index: code/branches/network/src/network/ConnectionManager.h
===================================================================
--- code/branches/network/src/network/ConnectionManager.h	(revision 887)
+++ code/branches/network/src/network/ConnectionManager.h	(revision 888)
@@ -14,4 +14,5 @@
 
 #include <string>
+#include <map>
 // enet library for networking support
 #include <enet/enet.h>
@@ -73,4 +74,12 @@
     bool quit; // quit-variable (communication with threads)
     ClientInformation *head_;
+    
+    //functions to map what object every clients uses
+    std::map<int, int> clientsShip;
+    void addClientsObjectID( int clientID, int objectID );
+    int getClientsShipID( int clientID );
+    int getObjectsClientID( int objectID );
+    void deleteClientIDReg( int clientID );
+    void deleteObjectIDReg( int objectID );
   };
 
Index: code/branches/network/src/network/NetworkPrereqs.h
===================================================================
--- code/branches/network/src/network/NetworkPrereqs.h	(revision 887)
+++ code/branches/network/src/network/NetworkPrereqs.h	(revision 888)
Index: code/branches/network/src/network/Server.h
===================================================================
--- code/branches/network/src/network/Server.h	(revision 887)
+++ code/branches/network/src/network/Server.h	(revision 888)
@@ -16,6 +16,10 @@
 #include <string>
 
+#include "orxonox/objects/Tickable.h"
+
 #include "PacketManager.h"
 #include "NetworkPrereqs.h"
+
+
 
 namespace network
@@ -25,5 +29,5 @@
   * It implements all functions necessary for a Server
   */
-  class _NetworkExport Server : public PacketDecoder{
+  class _NetworkExport Server : public PacketDecoder, public orxonox::Tickable{
   public:
     Server();
Index: code/branches/network/src/orxonox/Orxonox.cc
===================================================================
--- code/branches/network/src/orxonox/Orxonox.cc	(revision 887)
+++ code/branches/network/src/orxonox/Orxonox.cc	(revision 888)
@@ -63,5 +63,8 @@
 #include "network/Server.h"
 #include "network/Client.h"
-#include "network/NetworkFrameListener.h"
+#include "network/NetworkPrereqs.h"
+network::Client *client_g;
+network::Server *server_g;
+
 
 // objects
@@ -97,8 +100,8 @@
         updateAI();
 
-        if(mode_ == PRESENTATION)
-          server_g->tick(evt.timeSinceLastFrame);
-        else if(mode_ == CLIENT)
-          client_g->tick(evt.timeSinceLastFrame);
+//         if(mode_ == SERVER)
+//           server_g->tick(evt.timeSinceLastFrame);
+//         else if(mode_ == CLIENT)
+//           client_g->tick(evt.timeSinceLastFrame);
 
         usleep(10);
@@ -162,35 +165,27 @@
     //TODO: give config file to Ogre
     std::string mode;
-//     if(argc>=2)
-//       mode = std::string(argv[1]);
-//     else
-//       mode = "";
+    
+    
     ArgReader ar = ArgReader(argc, argv);
     ar.checkArgument("mode", mode, false);
     ar.checkArgument("data", this->dataPath_, false);
     ar.checkArgument("ip", serverIp_, false);
-    //mode = "presentation";
     if(ar.errorHandling()) die();
-    if(mode == std::string("server"))
+    if(mode == std::string("client"))
     {
+      mode_ = CLIENT;
+      clientInit(path);
+    }
+    else if(mode== std::string("server")){
+      mode_ = SERVER;
       serverInit(path);
-      mode_ = SERVER;
-    }
-    else if(mode == std::string("client"))
-    {
-      clientInit(path);
-      mode_ = CLIENT;
-    }
-    else if(mode == std::string("presentation"))
-    {
-      serverInit(path);
-      mode_ = PRESENTATION;
     }
     else{
+      mode_ = STANDALONE;
       standaloneInit(path);
-      mode_ = STANDALONE;
-    }
-  }
-
+    }
+  }
+
+  
   /**
    * start modules
@@ -198,4 +193,22 @@
   void Orxonox::start()
   {
+    switch(mode_){
+    case CLIENT:
+      clientStart();
+      break;
+    case SERVER:
+      serverStart();
+      break;
+    default:
+      standaloneStart();
+    }
+  }
+  
+  void Orxonox::clientStart(){
+    
+    
+  }
+  
+  void Orxonox::serverStart(){
     //TODO: start modules
     ogre_->startRender();
@@ -205,23 +218,22 @@
     setupScene();
     setupInputSystem();
-    if(mode_!=CLIENT){ // remove this in future ---- presentation hack
-    }
-    else
-      std::cout << "client here" << std::endl;
+    
     createFrameListener();
-    switch(mode_){
-    case PRESENTATION:
-      //ogre_->getRoot()->addFrameListener(new network::ServerFrameListener());
-      //std::cout << "could not add framelistener" << std::endl;
-      server_g->open();
-      break;
-    case CLIENT:
-      client_g->establishConnection();
-      break;
-    case SERVER:
-    case STANDALONE:
-    default:
-      break;
-    }
+    server_g->open();
+    
+    startRenderLoop();
+  }
+  
+  void Orxonox::standaloneStart(){
+    //TODO: start modules
+    ogre_->startRender();
+    //TODO: run engine
+    Factory::createClassHierarchy();
+    createScene();
+    setupScene();
+    setupInputSystem();
+    
+    createFrameListener();
+    
     startRenderLoop();
   }
@@ -246,70 +258,21 @@
   }
 
-  void Orxonox::standaloneInit(std::string path)
-  {
+
+  void Orxonox::serverInit(std::string path)
+  {
+    COUT(2) << "initialising server" << std::endl;
+    
     ogre_->setConfigPath(path);
     ogre_->setup();
     root_ = ogre_->getRoot();
     if(!ogre_->load()) die(/* unable to load */);
-
-    //defineResources();
-    //setupRenderSystem();
-    //createRenderWindow();
-    //initializeResourceGroups();
-    /*createScene();
-    setupScene();
-    setupInputSystem();
-    createFrameListener();
-    Factory::createClassHierarchy();
-    startRenderLoop();*/
-  }
-
-  void Orxonox::playableServer(std::string path)
-  {
-    ogre_->setConfigPath(path);
-    ogre_->setup();
-    root_ = ogre_->getRoot();
-    defineResources();
-    setupRenderSystem();
-    createRenderWindow();
-    initializeResourceGroups();
-    setupInputSystem();
-    Factory::createClassHierarchy();
-    createScene();
-    setupScene();
-    createFrameListener();
-    try{
-      server_g = new network::Server(); //!< add port and bindadress
-      server_g->open(); //!< open server and create listener thread
-      if(ogre_ && ogre_->getRoot())
-        ogre_->getRoot()->addFrameListener(new network::ServerFrameListener()); // adds a framelistener for the server
-      COUT(3) << "Info: network framelistener added" << std::endl;
-    }
-    catch(...)
-    {
-      COUT(1) << "Error: There was a problem initialising the server :(" << std::endl;
-    }
-    startRenderLoop();
-  }
-
-  void Orxonox::standalone(){
-
-
-
-  }
-
-  void Orxonox::serverInit(std::string path)
-  {
-    COUT(2) << "initialising server" << std::endl;
-    ogre_->setConfigPath(path);
-    ogre_->setup();
-    server_g = new network::Server(); // FIXME add some settings if wanted
-    if(!ogre_->load()) die(/* unable to load */);
-    // FIXME add network framelistener
+    
+    server_g = new network::Server();
   }
 
   void Orxonox::clientInit(std::string path)
   {
-    COUT(2) << "initialising client" << std::endl;
+    COUT(2) << "initialising client" << std::endl;\
+    
     ogre_->setConfigPath(path);
     ogre_->setup();
@@ -317,7 +280,16 @@
       client_g = new network::Client();
     else
-      client_g = new network::Client(serverIp_, 55556);
+      client_g = new network::Client(serverIp_, NETWORK_PORT);
     if(!ogre_->load()) die(/* unable to load */);
-    ogre_->getRoot()->addFrameListener(new network::ClientFrameListener());
+  }
+  
+  void Orxonox::standaloneInit(std::string path)
+  {
+    COUT(2) << "initialising standalone mode" << std::endl;
+    
+    ogre_->setConfigPath(path);
+    ogre_->setup();
+    root_ = ogre_->getRoot();
+    if(!ogre_->load()) die(/* unable to load */);
   }
 
Index: code/branches/network/src/orxonox/Orxonox.h
===================================================================
--- code/branches/network/src/orxonox/Orxonox.h	(revision 887)
+++ code/branches/network/src/orxonox/Orxonox.h	(revision 888)
@@ -25,8 +25,7 @@
 
   enum gameMode{
-    STANDALONE,
     SERVER,
     CLIENT,
-    PRESENTATION
+    STANDALONE
   };
 
@@ -54,6 +53,7 @@
       void standaloneInit(std::string path);
       // run functions
-      void playableServer(std::string path);
-      void standalone();
+      void serverStart();
+      void clientStart();
+      void standaloneStart();
       void defineResources();
       void setupRenderSystem();
Index: code/branches/network/src/orxonox/objects/SpaceShip.cc
===================================================================
--- code/branches/network/src/orxonox/objects/SpaceShip.cc	(revision 887)
+++ code/branches/network/src/orxonox/objects/SpaceShip.cc	(revision 888)
@@ -196,5 +196,5 @@
         SetConfigValue(bInvertYAxis_, false).description("Set this to true for joystick-like mouse behaviour (mouse up = ship down).");
         SetConfigValue(reloadTime_, 0.125).description("The reload time of the weapon in seconds");
-        SetConfigValue(testvector_, Vector3()).description("asdfblah");
+        //SetConfigValue(testvector_, Vector3()).description("asdfblah");
     }
 
