Index: code/trunk/src/core/ConsoleCommand.h
===================================================================
--- code/trunk/src/core/ConsoleCommand.h	(revision 1511)
+++ code/trunk/src/core/ConsoleCommand.h	(revision 1534)
@@ -42,5 +42,5 @@
 
 #define SetConsoleCommandGeneric(fakevariable, classname, command, bCreateShortcut) \
-    ConsoleCommand& fakevariable = ClassManager<classname>::getIdentifier()->addConsoleCommand(command, bCreateShortcut)
+    orxonox::ConsoleCommand& fakevariable = orxonox::ClassManager<classname>::getIdentifier()->addConsoleCommand(command, bCreateShortcut)
 
 
@@ -52,5 +52,5 @@
 
 #define SetConsoleCommandShortcutGeneric(fakevariable, command) \
-    ConsoleCommand& fakevariable = CommandExecutor::addConsoleCommandShortcut(command)
+    orxonox::ConsoleCommand& fakevariable = orxonox::CommandExecutor::addConsoleCommandShortcut(command)
 
 
Index: code/trunk/src/network/Client.cc
===================================================================
--- code/trunk/src/network/Client.cc	(revision 1511)
+++ code/trunk/src/network/Client.cc	(revision 1534)
@@ -42,7 +42,11 @@
 #include "Synchronisable.h"
 #include "core/CoreIncludes.h"
+#include "core/ConsoleCommand.h"
+#include "Server.h"
 
 namespace network
 {
+  SetConsoleCommandShortcut(Client, Chat);
+  
   Client* Client::_sClient = 0;
   
@@ -142,4 +146,12 @@
   
 
+  void Client::Chat( std::string message ){
+    if(Client::getSingleton())
+      Client::getSingleton()->sendChat(message);
+    else if(Server::getSingleton())
+      Server::getSingleton()->sendChat(message);
+    else
+      COUT(1) << "do you want to monologize ??" << std::endl;
+  }
   
 
@@ -224,6 +236,6 @@
   }
 
-  void Client::processChat( chat *data){
-    COUT(0) << "Server: " << data->message << std::endl;
+  void Client::processChat( chat *data, int clientId){
+    COUT(1) << data->message << std::endl;
     delete[] data->message;
     delete data;
Index: code/trunk/src/network/Client.h
===================================================================
--- code/trunk/src/network/Client.h	(revision 1511)
+++ code/trunk/src/network/Client.h	(revision 1534)
@@ -75,5 +75,5 @@
     bool closeConnection();
 
-    bool sendChat( std::string message );
+    static void Chat( std::string message );
     
     int getShipID(){return shipID_;}
@@ -96,8 +96,10 @@
     bool isSynched_;
 
+    bool sendChat( std::string message );
+    
     // implement data processing functions of PacketDecoder
     void processGamestate( GameStateCompressed *data, int clientID);
     void processClassid(classid *clid);
-    void processChat( chat *data);
+    void processChat( chat *data, int clientId );
     bool processWelcome( welcome *w );
     int clientID_;     // this is the id the server gave to us
Index: code/trunk/src/network/ClientConnection.cc
===================================================================
--- code/trunk/src/network/ClientConnection.cc	(revision 1511)
+++ code/trunk/src/network/ClientConnection.cc	(revision 1534)
@@ -57,5 +57,5 @@
     server=NULL;
     enet_address_set_host(&serverAddress, address.c_str());
-    serverAddress.port = NETWORK_PORT;
+    serverAddress.port = port;
     established=false;
   }
@@ -65,5 +65,5 @@
     server=NULL;
     enet_address_set_host(&serverAddress, address);
-    serverAddress.port = NETWORK_PORT;
+    serverAddress.port = port;
     established=false;
   }
@@ -107,5 +107,5 @@
     //network_threads.create_thread(boost::bind(boost::mem_fn(&ClientConnection::receiverThread), this));
     // wait 10 seconds for the connection to be established
-    return waitEstablished(3000);
+    return waitEstablished(NETWORK_CLIENT_CONNECT_TIMEOUT);
   }
 
@@ -169,5 +169,5 @@
       {
         boost::recursive_mutex::scoped_lock lock(enet_mutex_);
-        if(enet_host_service(client, event, NETWORK_CLIENT_TIMEOUT)<0){
+        if(enet_host_service(client, event, NETWORK_CLIENT_WAIT_TIME)<0){
           // we should never reach this point
           quit=true;
@@ -211,5 +211,5 @@
     boost::recursive_mutex::scoped_lock lock(enet_mutex_);
     enet_peer_disconnect(server, 0);
-    while(enet_host_service(client, &event, NETWORK_CLIENT_TIMEOUT) > 0){
+    while(enet_host_service(client, &event, NETWORK_CLIENT_WAIT_TIME) > 0){
       switch (event.type)
       {
@@ -238,12 +238,12 @@
     }
     // handshake
-    if(enet_host_service(client, &event, NETWORK_CLIENT_TIMEOUT)>=0 && event.type == ENET_EVENT_TYPE_CONNECT){
-      established=true;
-      return true;
-    }
-    else {
-      COUT(2) << "ClientConnection: enet_host_service < 0 or event.type != ENET_EVENT_TYPE_CONNECT # EVENT:" << event.type << std::endl;
-      return false;
-    }
+    while(enet_host_service(client, &event, NETWORK_CLIENT_WAIT_TIME)>=0 && !quit){
+      if( event.type == ENET_EVENT_TYPE_CONNECT ){
+        established=true;
+        return true;
+      }
+    }
+    COUT(2) << "ClientConnection: enet_host_service < 0 or event.type != ENET_EVENT_TYPE_CONNECT # EVENT:" << event.type << std::endl;
+    return false;
   }
 
Index: code/trunk/src/network/ClientConnection.h
===================================================================
--- code/trunk/src/network/ClientConnection.h	(revision 1511)
+++ code/trunk/src/network/ClientConnection.h	(revision 1534)
@@ -54,5 +54,6 @@
 #define NETWORK_PORT 55556
 #define NETWORK_CLIENT_MAX_CONNECTIONS 5
-#define NETWORK_CLIENT_TIMEOUT 1
+#define NETWORK_CLIENT_WAIT_TIME 1
+#define NETWORK_CLIENT_CONNECT_TIMEOUT 3000 // miliseconds
 #define NETWORK_CLIENT_CHANNELS 2
 
Index: code/trunk/src/network/ClientInformation.cc
===================================================================
--- code/trunk/src/network/ClientInformation.cc	(revision 1511)
+++ code/trunk/src/network/ClientInformation.cc	(revision 1534)
@@ -191,4 +191,12 @@
     failures_=0;
   }
+  
+  enet_uint32 ClientInformation::getRTT(){
+    return peer_->roundTripTime;
+  }
+  
+  enet_uint32 ClientInformation::getPacketLoss(){
+    return peer_->packetLoss;
+  }
 
   int ClientInformation::getGamestateID() {
Index: code/trunk/src/network/ClientInformation.h
===================================================================
--- code/trunk/src/network/ClientInformation.h	(revision 1511)
+++ code/trunk/src/network/ClientInformation.h	(revision 1534)
@@ -87,4 +87,6 @@
     void addFailure();
     void resetFailures();
+    enet_uint32 getRTT();
+    enet_uint32 getPacketLoss();
     
     bool removeClient(int clientID);
Index: code/trunk/src/network/ConnectionManager.cc
===================================================================
--- code/trunk/src/network/ConnectionManager.cc	(revision 1511)
+++ code/trunk/src/network/ConnectionManager.cc	(revision 1534)
@@ -168,5 +168,6 @@
     boost::recursive_mutex::scoped_lock lock(enet_mutex_);
     for(ClientInformation *i=head_->next(); i!=0; i=i->next()){
-      if(enet_peer_send(i->getPeer(), (enet_uint8)i->getID(), packet)!=0)
+      COUT(3) << "adding broadcast packet for client: " << i->getID() << std::endl;
+      if(enet_peer_send(i->getPeer(), 0, packet)!=0)
         return false;
     }
Index: code/trunk/src/network/GameStateClient.cc
===================================================================
--- code/trunk/src/network/GameStateClient.cc	(revision 1511)
+++ code/trunk/src/network/GameStateClient.cc	(revision 1534)
@@ -82,5 +82,5 @@
       if (loadSnapshot(gs)){
         gameStateMap.insert(std::pair<int, GameState*>(gs->id, gs));
-        COUT(4) << "adding decoded gs with id: " << gs->id << " diffed from: " << gs->base_id << std::endl;
+        COUT(5) << "adding decoded gs with id: " << gs->id << " diffed from: " << gs->base_id << std::endl;
         last_diff_=gs->base_id;
         //last_gamestate_=gs->id;
@@ -241,5 +241,5 @@
       size+=it->getSize(); // size of the actual data of the synchronisable
       size+=3*sizeof(int); // size of datasize, classID and objectID
-      COUT(4) << "getpartialsnapshot: size: " << size << std::endl;
+      COUT(5) << "getpartialsnapshot: size: " << size << std::endl;
     }
     //retval->data = (unsigned char*)malloc(size);
@@ -380,5 +380,5 @@
     //std::cout << "length " << length << std::endl;
     switch ( retval ) {
-      case Z_OK: COUT(4) << "successfully decompressed" << std::endl; break;
+      case Z_OK: COUT(5) << "successfully decompressed" << std::endl; break;
       case Z_MEM_ERROR: COUT(1) << "not enough memory available" << std::endl; return NULL;
       case Z_BUF_ERROR: COUT(2) << "not enough memory available in the buffer" << std::endl; return NULL;
@@ -399,5 +399,5 @@
 
   GameState *GameStateClient::decode(GameState *old, GameStateCompressed *diff) {
-    COUT(4) << "using diffed gamestate" << std::endl;
+    COUT(5) << "using diffed gamestate" << std::endl;
     GameState *t = decode(diff);
     if(!t)
Index: code/trunk/src/network/GameStateManager.cc
===================================================================
--- code/trunk/src/network/GameStateManager.cc	(revision 1511)
+++ code/trunk/src/network/GameStateManager.cc	(revision 1534)
@@ -44,4 +44,5 @@
 #include <iostream>
 #include <zlib.h>
+#include <assert.h>
 
 #include "core/CoreIncludes.h"
@@ -106,5 +107,5 @@
         break;
       if( (*it).second <= 0 ){
-        COUT(4) << "GameStateManager: deleting gamestate with id: " << (*it).first << ", uses: " << (*it).second << std::endl;
+        COUT(5) << "GameStateManager: deleting gamestate with id: " << (*it).first << ", uses: " << (*it).second << std::endl;
         std::map<int, GameState *>::iterator tempit = gameStateMap.find((*it).first);
         if( tempit != gameStateMap.end() ){
@@ -140,5 +141,6 @@
         client = it->second;
       GameState *server = reference;
-      COUT(4) << "client: " << client << " server: " << server << " gamestatemap: " << &gameStateMap << " size: " << server->size << std::endl;
+      //COUT(4) << "client: " << client << " server: " << server << " gamestatemap: " << &gameStateMap << " size: " << server->size << std::endl;
+      COUT(4) << "client: " << (client!=0 ? client->id : (int)client) << " server: " << server->id << " gamestatemap: " << &gameStateMap << " size: " << server->size << std::endl;
       if(client)
         return encode(client, server);
@@ -267,5 +269,5 @@
       sync.data = data;
       data+=sync.length;
-      COUT(4) << "objectID: " << sync.objectID << " classID: " << sync.classID << std::endl;
+      COUT(5) << "objectID: " << sync.objectID << " classID: " << sync.classID << std::endl;
       while(it && it->objectID!=sync.objectID)
         ++it;
@@ -319,5 +321,5 @@
 
   GameStateCompressed *GameStateManager::encode(GameState *a, GameState *b) {
-    COUT(4) << "G.St.Man: this will be a DIFFED gamestate" << std::endl;
+    COUT(5) << "G.St.Man: this will be a DIFFED gamestate" << std::endl;
     GameState *r = diff(a,b);
     GameStateCompressed *c = compress_(r);
@@ -472,6 +474,8 @@
     if(gamestateID == GAMESTATEID_INITIAL){
       temp->setGameStateID(GAMESTATEID_INITIAL);
-      if(curid!=GAMESTATEID_INITIAL)
+      if(curid!=GAMESTATEID_INITIAL){
+        assert(gameStateUsed.find(curid)!=gameStateUsed.end());
         --(gameStateUsed.find(curid)->second);
+      }
       return;
     }
@@ -483,8 +487,14 @@
 //     deleteUnusedGameState(curid);
     //increase gamestateused
-    if(curid!=GAMESTATEID_INITIAL)
-      --(gameStateUsed.find(curid)->second);
-    ++(gameStateUsed.find(gamestateID)->second);
-    temp->setGameStateID(gamestateID);
+    std::map<int, int>::iterator it = gameStateUsed.find(curid);
+    if(curid!=GAMESTATEID_INITIAL){
+      if(it!=gameStateUsed.end())
+        --(it->second);
+    }
+    it = gameStateUsed.find(gamestateID);
+    if(it!=gameStateUsed.end()){
+      ++(it->second);
+      temp->setGameStateID(gamestateID);
+    }
     /*
     GameState *old = clientGameState[clientID];
Index: code/trunk/src/network/NetworkCallback.h
===================================================================
--- code/trunk/src/network/NetworkCallback.h	(revision 1534)
+++ code/trunk/src/network/NetworkCallback.h	(revision 1534)
@@ -0,0 +1,28 @@
+#ifndef _NETWORK_CALLBACK__
+#define _NETWORK_CALLBACK__
+
+namespace network{
+  class NetworkCallbackBase
+  {
+    public:
+      virtual void call() = 0;
+  };
+  
+  template <class T>
+  class NetworkCallback: public NetworkCallbackBase
+  {
+    public:
+      NetworkCallback(T* object, void (T::*function) (void)) : object_(object), function_(function) {}
+      virtual void call()
+        { (this->object_->*function_)(); }
+  
+    private:
+      T* object_;
+      void (T::*function_) (void);
+  }; 
+
+
+}
+
+
+#endif
Index: code/trunk/src/network/PacketDecoder.cc
===================================================================
--- code/trunk/src/network/PacketDecoder.cc	(revision 1511)
+++ code/trunk/src/network/PacketDecoder.cc	(revision 1534)
@@ -151,8 +151,8 @@
   void PacketDecoder::gstate( ENetPacket* packet, int clientID )
   {
-    if(!testAndRemoveCRC(packet)){
-      COUT(3) << "crc test of gamestate failed - dropping packet" << std::endl;
-      return;
-    }
+//    if(!testAndRemoveCRC(packet)){
+//     COUT(3) << "crc test of gamestate failed - dropping packet" << std::endl;
+//      return;
+//    }
     GameStateCompressed* currentState = NULL;
     currentState = new GameStateCompressed;
Index: code/trunk/src/network/PacketGenerator.cc
===================================================================
--- code/trunk/src/network/PacketGenerator.cc	(revision 1511)
+++ code/trunk/src/network/PacketGenerator.cc	(revision 1534)
@@ -144,6 +144,6 @@
     COUT(4) << "PacketGenerator generating totalLen " << totalLen << std::endl;
     //delete[] data;
-    if(!addCRC(packet))
-      COUT(3) << "could not add crc to gamestate packet" << std::endl;
+//    if(!addCRC(packet))
+//      COUT(3) << "could not add crc to gamestate packet" << std::endl;
     return packet;
   }
Index: code/trunk/src/network/Server.cc
===================================================================
--- code/trunk/src/network/Server.cc	(revision 1511)
+++ code/trunk/src/network/Server.cc	(revision 1534)
@@ -51,12 +51,38 @@
 #include "util/Sleep.h"
 #include "objects/SpaceShip.h"
-
+#include "core/ConsoleCommand.h"
 
 namespace network
 {
-  
-  
-#define MAX_FAILURES 20;
-#define NETWORK_FREQUENCY 30
+  #define MAX_FAILURES 20;
+  #define NETWORK_FREQUENCY 30
+  
+  Server *Server::instance_=0;
+  
+  Server *Server::createSingleton(){
+    if(!instance_)
+      instance_ = new Server();
+    return instance_;
+  }
+  Server *Server::createSingleton(int port){
+    if(!instance_)
+      instance_ = new Server(port);
+    return instance_;
+  }
+  Server *Server::createSingleton(int port, std::string bindAddress){
+    if(!instance_)
+      instance_ = new Server(port, bindAddress);
+    return instance_;
+  }
+  Server *Server::createSingleton(int port, const char *bindAddress){
+    if(!instance_)
+      instance_ = new Server(port, bindAddress);
+    return instance_;
+  }
+  
+  Server *Server::getSingleton(){
+    return instance_;
+  }
+  
   
   /**
@@ -127,8 +153,6 @@
   * @return true/false
   */
-  bool Server::sendMSG(std::string msg) {
-    ENetPacket *packet = packet_gen.chatMessage(msg.c_str());
-    //std::cout <<"adding packets" << std::endl;
-    return connection->addPacketAll(packet);
+  bool Server::sendChat(std::string msg) {
+    return sendChat(msg.c_str());
   }
 
@@ -138,7 +162,10 @@
   * @return true/false
   */
-  bool Server::sendMSG(const char *msg) {
-    ENetPacket *packet = packet_gen.chatMessage(msg);
-    COUT(4) <<"Server: adding Packets" << std::endl;
+  bool Server::sendChat(const char *msg) {
+    char *message = new char [strlen(msg)+10+1];
+    sprintf(message, "Player %d: %s", CLIENTID_SERVER, msg);
+    COUT(1) << message << std::endl;
+    ENetPacket *packet = packet_gen.chatMessage(message);
+    COUT(5) <<"Server: adding Packets" << std::endl;
     return connection->addPacketAll(packet);
   }
@@ -202,9 +229,9 @@
   void Server::updateGamestate() {
     gamestates->update();
-    COUT(4) << "Server: one gamestate update complete, goig to sendGameState" << std::endl;
+    COUT(5) << "Server: one gamestate update complete, goig to sendGameState" << std::endl;
     //std::cout << "updated gamestate, sending it" << std::endl;
     //if(clients->getGamestateID()!=GAMESTATEID_INITIAL)
     sendGameState();
-    COUT(4) << "Server: one sendGameState turn complete, repeat in next tick" << std::endl;
+    COUT(5) << "Server: one sendGameState turn complete, repeat in next tick" << std::endl;
     //std::cout << "sent gamestate" << std::endl;
   }
@@ -229,4 +256,5 @@
         continue;
       }
+      COUT(4) << "client id: " << temp->getID() << " RTT: " << temp->getRTT() << " loss: " << temp->getPacketLoss() << std::endl;
       COUT(5) << "Server: doing gamestate gamestate preparation" << std::endl;
       int gid = temp->getGamestateID(); //get gamestate id
@@ -287,4 +315,14 @@
   }
   
+  void Server::processChat( chat *data, int clientId){
+    char *message = new char [strlen(data->message)+10+1];
+    sprintf(message, "Player %d: %s", clientId, data->message);
+    COUT(1) << message << std::endl;
+    ENetPacket *pck = packet_gen.chatMessage(message);
+    connection->addPacketAll(pck);
+    delete[] data->message;
+    delete data;
+  }
+  
   bool Server::addClient(ENetEvent *event){
     ClientInformation *temp = clients->insertBack(new ClientInformation);
@@ -312,5 +350,5 @@
     COUT(4) << "Con.Man: creating client id: " << temp->getID() << std::endl;
     connection->syncClassid(temp->getID());
-    COUT(4) << "creating spaceship for clientid: " << temp->getID() << std::endl;
+    COUT(5) << "creating spaceship for clientid: " << temp->getID() << std::endl;
     // TODO: this is only a hack, untill we have a possibility to define default player-join actions
     if(!createShip(temp))
Index: code/trunk/src/network/Server.h
===================================================================
--- code/trunk/src/network/Server.h	(revision 1511)
+++ code/trunk/src/network/Server.h	(revision 1534)
@@ -53,4 +53,6 @@
 namespace network
 {
+  #define CLIENTID_SERVER 0
+  
   /**
   * This class is the root class of the network module for a server.
@@ -59,12 +61,15 @@
   class _NetworkExport Server : public PacketDecoder, public orxonox::Tickable{
   public:
-    Server();
-    Server(int port);
-    Server(int port, std::string bindAddress);
-    Server(int port, const char *bindAddress);
+    static Server *createSingleton();
+    static Server *createSingleton(int port);
+    static Server *createSingleton(int port, std::string bindAddress);
+    static Server *createSingleton(int port, const char *bindAddress);
+    
+    static Server *getSingleton();
+    
     void open();
     void close();
-    bool sendMSG(std::string msg);
-    bool sendMSG(const char *msg);
+    bool sendChat(std::string msg);
+    bool sendChat(const char *msg);
     void tick(float time);
   protected:
@@ -72,4 +77,11 @@
     void updateGamestate();
   private:
+    Server();
+    Server(int port);
+    Server(int port, std::string bindAddress);
+    Server(int port, const char *bindAddress);
+    
+    static Server *instance_;
+    
     bool addClient(ENetEvent *event);
     bool createClient(int clientID);
@@ -82,4 +94,5 @@
     bool processConnectRequest( connectRequest *con, int clientID );
     void processGamestate( GameStateCompressed *data, int clientID);
+    void processChat( chat *data, int clientId);
     ConnectionManager *connection;
     GameStateManager *gamestates;
Index: code/trunk/src/network/Synchronisable.cc
===================================================================
--- code/trunk/src/network/Synchronisable.cc	(revision 1511)
+++ code/trunk/src/network/Synchronisable.cc	(revision 1534)
@@ -45,4 +45,5 @@
 
 #include "core/CoreIncludes.h"
+// #include "core/Identifier.h"
 
 namespace network
@@ -66,4 +67,8 @@
 
   Synchronisable::~Synchronisable(){
+    // delete callback function objects
+    if(!orxonox::Identifier::isCreatingHierarchy())
+      for(std::list<synchronisableVariable *>::iterator it = syncList->begin(); it!=syncList->end(); it++)
+        delete (*it)->callback;
   }
   
@@ -87,5 +92,5 @@
   * @param size size of the datatype the variable consists of
   */
-  void Synchronisable::registerVar(void *var, int size, variableType t, int mode){
+  void Synchronisable::registerVar(void *var, int size, variableType t, int mode, NetworkCallbackBase *cb){
     // create temporary synch.Var struct
     synchronisableVariable *temp = new synchronisableVariable;
@@ -94,4 +99,5 @@
     temp->mode = mode; 
     temp->type = t;
+    temp->callback = cb;
     COUT(5) << "Syncronisable::registering var with size: " << temp->size << " and type: " << temp->type << std::endl; 
     // increase datasize
@@ -218,6 +224,10 @@
       }
       COUT(5) << "Synchronisable: element size: " << (*i)->size << " type: " << (*i)->type << std::endl;
+      bool callback=false;
       switch((*i)->type){
       case DATA:
+        if((*i)->callback) // check whether this variable changed (but only if callback was set)
+          if(strncmp((char *)(*i)->var, (char *)data, (*i)->size)!=0)
+            callback=true;
         memcpy((void*)(*i)->var, data, (*i)->size);
         data+=(*i)->size;
@@ -227,4 +237,7 @@
         COUT(5) << "string size: " << (*i)->size << std::endl;
         data+=sizeof(int);
+        if((*i)->callback) // check whether this string changed
+          if( *(std::string *)((*i)->var) != std::string((char *)data) )
+            callback=true;
         *((std::string *)((*i)->var)) = std::string((const char*)data);
         COUT(5) << "synchronisable: char: " << (const char*)data << " string: " << std::string((const char*)data) << std::endl;
@@ -232,4 +245,7 @@
         break;
       }
+      // call the callback function, if defined
+      if(callback)
+        (*i)->callback->call();
     }
     return true;
Index: code/trunk/src/network/Synchronisable.h
===================================================================
--- code/trunk/src/network/Synchronisable.h	(revision 1511)
+++ code/trunk/src/network/Synchronisable.h	(revision 1534)
@@ -27,15 +27,4 @@
  */
 
-//
-// C++ Interface: synchronisable
-//
-// Description:
-//
-//
-// Author:  Oliver Scheuss, (C) 2007
-//
-// Copyright: See COPYING file that comes with this distribution
-//
-//
 #ifndef _Synchronisable_H__
 #define _Synchronisable_H__
@@ -45,4 +34,5 @@
 #include <list>
 #include "core/OrxonoxClass.h"
+#include "NetworkCallback.h"
 
 namespace network
@@ -65,4 +55,5 @@
     void *var;
     variableType type;
+    NetworkCallbackBase *callback;
   }SYNCVAR;
 
@@ -81,5 +72,5 @@
     int classID;
 
-    void registerVar(void *var, int size, variableType t, int mode=1);
+    void registerVar(void *var, int size, variableType t, int mode=1, NetworkCallbackBase *cb=0);
     //  syncData getData();
     syncData getData(unsigned char *mem, int mode=0x0);
Index: code/trunk/src/orxonox/Orxonox.cc
===================================================================
--- code/trunk/src/orxonox/Orxonox.cc	(revision 1511)
+++ code/trunk/src/orxonox/Orxonox.cc	(revision 1534)
@@ -127,5 +127,5 @@
       network::Client::destroySingleton();
     if (server_g)
-      delete server_g;
+      delete network::Server::getSingleton();
   }
 
@@ -303,5 +303,6 @@
     COUT(2) << "Loading level in server mode" << std::endl;
 
-    server_g = new network::Server(serverPort_);
+    //server_g = new network::Server(serverPort_);
+    server_g = network::Server::createSingleton(serverPort_);
 
     if (!loadScene())
Index: code/trunk/src/orxonox/objects/SpaceShip.cc
===================================================================
--- code/trunk/src/orxonox/objects/SpaceShip.cc	(revision 1511)
+++ code/trunk/src/orxonox/objects/SpaceShip.cc	(revision 1534)
@@ -69,4 +69,5 @@
     SpaceShip* SpaceShip::instance_s;
 
+    
     SpaceShip *SpaceShip::getLocalShip(){
       Iterator<SpaceShip> it;
@@ -163,5 +164,5 @@
 
     void SpaceShip::registerAllVariables(){
-      registerVar( &camName_, camName_.length()+1, network::STRING, 0x1);
+      registerVar( &camName_, camName_.length()+1, network::STRING, 0x1 );
       registerVar( &maxSpeed_, sizeof(maxSpeed_), network::DATA, 0x1);
       registerVar( &maxSideAndBackSpeed_, sizeof(maxSideAndBackSpeed_), network::DATA, 0x1);
@@ -469,5 +470,5 @@
         if( myShip_ )
         {
-          COUT(4) << "steering our ship: " << objectID << std::endl;
+          COUT(5) << "steering our ship: " << objectID << std::endl;
           this->acceleration_.x = 0;
           this->acceleration_.y = 0;
Index: code/trunk/src/orxonox/objects/SpaceShip.h
===================================================================
--- code/trunk/src/orxonox/objects/SpaceShip.h	(revision 1511)
+++ code/trunk/src/orxonox/objects/SpaceShip.h	(revision 1534)
@@ -44,4 +44,5 @@
     {
         public:
+          
 
             static SpaceShip *getLocalShip();
