Index: code/branches/netp6/src/network/ClientInformation.h
===================================================================
--- code/branches/netp6/src/network/ClientInformation.h	(revision 3299)
+++ code/branches/netp6/src/network/ClientInformation.h	(revision 3302)
@@ -87,4 +87,5 @@
     static ClientInformation *findClient(ENetAddress *address, bool look_backwards=false);
     static ClientInformation *getBegin(){return head_;}
+    static bool hasClients(){ return ClientInformation::head_!=0; }
 
     bool setSynched(bool s);
Index: code/branches/netp6/src/network/Connection.cc
===================================================================
--- code/branches/netp6/src/network/Connection.cc	(revision 3299)
+++ code/branches/netp6/src/network/Connection.cc	(revision 3302)
@@ -31,5 +31,4 @@
 #include <cassert>
 #include <enet/enet.h>
-#include <OgreTimer.h>
 #include "packet/Packet.h"
 
@@ -77,7 +76,6 @@
     
     assert(this->host_);
-    Ogre::Timer timer;
 
-    while( timer.getMilliseconds()<NETWORK_MAX_QUEUE_PROCESS_TIME && enet_host_service( this->host_, &event, NETWORK_WAIT_TIMEOUT ) > 0 )
+    while( enet_host_service( this->host_, &event, NETWORK_WAIT_TIMEOUT ) > 0 )
     {
       switch(event.type){
Index: code/branches/netp6/src/network/GamestateManager.cc
===================================================================
--- code/branches/netp6/src/network/GamestateManager.cc	(revision 3299)
+++ code/branches/netp6/src/network/GamestateManager.cc	(revision 3302)
@@ -99,4 +99,6 @@
 
   bool GamestateManager::processGamestates(){
+    if( this->gamestateQueue.empty() )
+        return true;
     std::map<unsigned int, packet::Gamestate*>::iterator it;
     // now push only the most recent gamestates we received (ignore obsolete ones)
@@ -141,5 +143,4 @@
       int cid = temp->getID(); //get client id
       
-      packet::Gamestate *gs;
       unsigned int gID = temp->getGamestateID();
       if(!reference)
@@ -242,5 +243,5 @@
 
     assert(curid==(unsigned int)GAMESTATEID_INITIAL || curid<gamestateID);
-    COUT(4) << "acking gamestate " << gamestateID << " for clientid: " << clientID << " curid: " << curid << std::endl;
+    COUT(5) << "acking gamestate " << gamestateID << " for clientid: " << clientID << " curid: " << curid << std::endl;
     std::map<unsigned int, packet::Gamestate*>::iterator it;
     for(it = gamestateMap_[clientID].begin(); it!=gamestateMap_[clientID].end() && it->first<gamestateID; ){
Index: code/branches/netp6/src/network/Server.cc
===================================================================
--- code/branches/netp6/src/network/Server.cc	(revision 3299)
+++ code/branches/netp6/src/network/Server.cc	(revision 3302)
@@ -49,5 +49,4 @@
 #include "core/ObjectList.h"
 #include "core/Executor.h"
-#include "core/ThreadPool.h"
 #include "packet/Chat.h"
 #include "packet/ClassID.h"
@@ -71,5 +70,4 @@
   Server::Server() {
     this->timeSinceLastUpdate_=0;
-    this->threadPool_ = new ThreadPool();
   }
 
@@ -77,5 +75,4 @@
     this->setPort( port );
     this->timeSinceLastUpdate_=0;
-    this->threadPool_ = new ThreadPool();
   }
 
@@ -89,5 +86,4 @@
     this->setBindAddress( bindAddress );
     this->timeSinceLastUpdate_=0;
-    this->threadPool_ = new ThreadPool();
   }
 
@@ -96,5 +92,4 @@
   */
   Server::~Server(){
-    delete this->threadPool_;
   }
 
@@ -141,24 +136,22 @@
     // receive incoming packets
     Connection::processQueue();
-    // process incoming gamestates
-    GamestateManager::processGamestates();
     
-    // pass sendFunctionCalls to worker thread pool
-    ExecutorStatic* functioncalls = createExecutor( createFunctor(&FunctionCallManager::sendCalls) );
-    this->threadPool_->passFunction( functioncalls, true );
-    
-    this->threadPool_->synchronise();
-    
-    //this steers our network frequency
-    timeSinceLastUpdate_+=time.getDeltaTime();
-    if(timeSinceLastUpdate_>=NETWORK_PERIOD)
+    if ( ClientInformation::hasClients() )
     {
-      timeSinceLastUpdate_ -= static_cast<unsigned int>( timeSinceLastUpdate_ / NETWORK_PERIOD ) * NETWORK_PERIOD;
-//       ExecutorMember<GamestateManager>* updategamestate = createExecutor( createFunctor(&GamestateManager::updateGamestate);
-//       updategamestate->setObject( static_cast<GamestateManager*>(this) );
-//       this->threadPool_->passFunction( updategamestate );
-      updateGamestate();
-    }
-    sendPackets(); // flush the enet queue
+      // process incoming gamestates
+      GamestateManager::processGamestates();
+      
+      // send function calls to clients
+      FunctionCallManager::sendCalls();
+      
+      //this steers our network frequency
+      timeSinceLastUpdate_+=time.getDeltaTime();
+      if(timeSinceLastUpdate_>=NETWORK_PERIOD)
+      {
+        timeSinceLastUpdate_ -= static_cast<unsigned int>( timeSinceLastUpdate_ / NETWORK_PERIOD ) * NETWORK_PERIOD;
+        updateGamestate();
+      }
+      sendPackets(); // flush the enet queue
+    }
   }
 
Index: code/branches/netp6/src/network/Server.h
===================================================================
--- code/branches/netp6/src/network/Server.h	(revision 3299)
+++ code/branches/netp6/src/network/Server.h	(revision 3302)
@@ -76,5 +76,4 @@
     void syncClassid(unsigned int clientID);
 
-    ThreadPool* threadPool_;
     float timeSinceLastUpdate_;
   };
Index: code/branches/netp6/src/network/packet/ClassID.cc
===================================================================
--- code/branches/netp6/src/network/packet/ClassID.cc	(revision 3299)
+++ code/branches/netp6/src/network/packet/ClassID.cc	(revision 3302)
@@ -142,5 +142,5 @@
     classname = temp+2*sizeof(uint32_t);
     id=ClassByString( std::string((const char*)classname) );
-    COUT(0) << "processing classid: " << networkID << " name: " << classname << " id: " << id << std::endl;
+    COUT(3) << "processing classid: " << networkID << " name: " << classname << " id: " << id << std::endl;
     if(id==NULL){
       COUT(0) << "Recieved a bad classname" << endl;
Index: code/branches/netp6/src/network/packet/FunctionIDs.cc
===================================================================
--- code/branches/netp6/src/network/packet/FunctionIDs.cc	(revision 3299)
+++ code/branches/netp6/src/network/packet/FunctionIDs.cc	(revision 3302)
@@ -132,5 +132,5 @@
     stringsize = *(uint32_t*)(temp+sizeof(uint32_t));
     functionname = temp+2*sizeof(uint32_t);
-    COUT(0) << "processing functionid: " << networkID << " name: " << functionname << std::endl;
+    COUT(3) << "processing functionid: " << networkID << " name: " << functionname << std::endl;
     NetworkFunctionBase::setNetworkID((const char*)functionname, networkID);
     temp += 2*sizeof(uint32_t) + stringsize;
Index: code/branches/netp6/src/network/synchronisable/Synchronisable.cc
===================================================================
--- code/branches/netp6/src/network/synchronisable/Synchronisable.cc	(revision 3299)
+++ code/branches/netp6/src/network/synchronisable/Synchronisable.cc	(revision 3302)
@@ -96,10 +96,10 @@
       if (this->objectMode_ != 0x0 && (Host::running() && Host::isServer()))
         deletedObjects_.push(objectID);
-      // delete all Synchronisable Variables from syncList ( which are also in stringList )
-      for(std::vector<SynchronisableVariableBase*>::iterator it = syncList.begin(); it!=syncList.end(); it++)
-        delete (*it);
-      syncList.clear();
-      stringList.clear();
-    }
+    }
+    // delete all Synchronisable Variables from syncList ( which are also in stringList )
+    for(std::vector<SynchronisableVariableBase*>::iterator it = syncList.begin(); it!=syncList.end(); it++)
+      delete (*it);
+    syncList.clear();
+    stringList.clear();
     std::map<uint32_t, Synchronisable*>::iterator it;
     it = objectMap_.find(objectID);
Index: code/branches/netp6/src/network/synchronisable/SynchronisableSpecialisations.cc
===================================================================
--- code/branches/netp6/src/network/synchronisable/SynchronisableSpecialisations.cc	(revision 3299)
+++ code/branches/netp6/src/network/synchronisable/SynchronisableSpecialisations.cc	(revision 3302)
@@ -38,20 +38,13 @@
 namespace orxonox{
   
-//   template <> void Synchronisable::registerVariable( const std::string& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional)
-//   {
-//     if (bidirectional)
-//       syncList.push_back(new SynchronisableVariableBidirectional<const std::string>(variable, mode, cb));
-//     else
-//       syncList.push_back(new SynchronisableVariable<const std::string>(variable, mode, cb));
-//     stringList.push_back(syncList.back());
-//   }
-  
   template <> void Synchronisable::registerVariable( std::string& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional)
   {
+    SynchronisableVariableBase* sv;
     if (bidirectional)
-      syncList.push_back(new SynchronisableVariableBidirectional<const std::string>(variable, mode, cb));
+      sv = new SynchronisableVariableBidirectional<const std::string>(variable, mode, cb);
     else
-      syncList.push_back(new SynchronisableVariable<const std::string>(variable, mode, cb));
-    stringList.push_back(syncList.back());
+      sv = new SynchronisableVariable<const std::string>(variable, mode, cb);
+    syncList.push_back(sv);
+    stringList.push_back(sv);
   }
   
