Index: code/branches/network/src/network/ConnectionManager.cc
===================================================================
--- code/branches/network/src/network/ConnectionManager.cc	(revision 2757)
+++ code/branches/network/src/network/ConnectionManager.cc	(revision 2758)
@@ -46,7 +46,4 @@
 #include <boost/bind.hpp>
 
-// #include "core/CoreIncludes.h"
-// #include "core/BaseObject.h"
-// #include "core/Iterator.h"
 #include "util/Math.h"
 #include "util/Sleep.h"
@@ -124,6 +121,4 @@
   void ConnectionManager::createListener() {
     receiverThread_ = new boost::thread(boost::bind(&ConnectionManager::receiverThread, this));
-    //network_threads.create_thread(boost::bind(boost::mem_fn(&ConnectionManager::receiverThread), this));
-         //boost::thread thr(boost::bind(boost::mem_fn(&ConnectionManager::receiverThread), this));
     return;
   }
@@ -131,5 +126,4 @@
   bool ConnectionManager::quitListener() {
     quit=true;
-    //network_threads.join_all();
     receiverThread_->join();
     return true;
@@ -206,23 +200,9 @@
         // log handling ================
         case ENET_EVENT_TYPE_CONNECT:
-          //COUT(3) << "adding event_type_connect to queue" << std::endl;
         case ENET_EVENT_TYPE_DISCONNECT:
-          //addClient(event);
-          //this is a workaround to ensure thread safety
-          //COUT(5) << "Con.Man: connection event has occured" << std::endl;
-          //break;
         case ENET_EVENT_TYPE_RECEIVE:
-          //std::cout << "received data" << std::endl;
-          //COUT(5) << "Con.Man: receive event has occured" << std::endl;
-          // only add, if client has connected yet and not been disconnected
-          //if(head_->findClient(&event->peer->address))
             processData(event);
             event = new ENetEvent;
-//           else
-//             COUT(3) << "received a packet from a client we don't know" << std::endl;
           break;
-        //case ENET_EVENT_TYPE_DISCONNECT:
-          //clientDisconnect(event->peer);
-          //break;
         case ENET_EVENT_TYPE_NONE:
           //receiverThread_->yield();
@@ -299,33 +279,4 @@
   }
 
-  /**
-   *
-   * @param clientID
-   */
-//   void ConnectionManager::syncClassid(unsigned int clientID) {
-//     unsigned int network_id=0, failures=0;
-//     std::string classname;
-//     Identifier *id;
-//     std::map<std::string, Identifier*>::const_iterator it = Factory::getFactoryMapBegin();
-//     while(it != Factory::getFactoryMapEnd()){
-//       id = (*it).second;
-//       if(id == NULL)
-//         continue;
-//       classname = id->getName();
-//       network_id = id->getNetworkID();
-//       if(network_id==0)
-//         COUT(3) << "we got a null class id: " << id->getName() << std::endl;
-//       COUT(4) << "Con.Man:syncClassid:\tnetwork_id: " << network_id << ", classname: " << classname << std::endl;
-// 
-//       packet::ClassID *classid = new packet::ClassID( network_id, classname );
-//       classid->setClientID(clientID);
-//       while(!classid->send() && failures < 10){
-//         failures++;
-//       }
-//       ++it;
-//     }
-//     //sendPackets();
-//     COUT(4) << "syncClassid:\tall synchClassID packets have been sent" << std::endl;
-//   }
 
   void ConnectionManager::syncClassid(unsigned int clientID) {
Index: code/branches/network/src/network/ConnectionManager.h
===================================================================
--- code/branches/network/src/network/ConnectionManager.h	(revision 2757)
+++ code/branches/network/src/network/ConnectionManager.h	(revision 2758)
@@ -76,30 +76,21 @@
     static boost::recursive_mutex enet_mutex;
     ConnectionManager();
-    //ConnectionManager(ClientInformation *head);
     ConnectionManager(int port);
     ConnectionManager(int port, const char *address);
     ConnectionManager(int port, const std::string& address);
     ~ConnectionManager();
-    //ENetPacket *getPacket(ENetAddress &address); // thread1
-    //ENetPacket *getPacket(int &clientID);
     ENetEvent *getEvent();
     bool queueEmpty();
     void createListener();
     bool quitListener();
-//     bool addPacket(Packet::Packet *packet);
     static bool addPacket(ENetPacket *packet, ENetPeer *peer);
     static bool addPacket(ENetPacket *packet, int ID);
     static bool addPacketAll(ENetPacket *packet);
-  //  bool sendPackets(ENetEvent *event);
     bool sendPackets();
-    //bool createClient(int clientID);
     void disconnectClient(ClientInformation *client);
     void syncClassid(unsigned int clientID);
 
   private:
-//     bool clientDisconnect(ENetPeer *peer);
-//     bool removeClient(int clientID);
     bool processData(ENetEvent *event);
-    //bool addClient(ENetEvent *event);
     void receiverThread();
     void disconnectClients();
Index: code/branches/network/src/network/packet/ClassID.cc
===================================================================
--- code/branches/network/src/network/packet/ClassID.cc	(revision 2757)
+++ code/branches/network/src/network/packet/ClassID.cc	(revision 2758)
@@ -155,8 +155,4 @@
 
 
-// uint32_t ClassID::getClassID(){
-//   return *(uint32_t *)(data_ + _CLASSID);
-// }
-
 } //namespace packet
 }//namespace orxonox
Index: code/branches/network/src/network/packet/ClassID.h
===================================================================
--- code/branches/network/src/network/packet/ClassID.h	(revision 2757)
+++ code/branches/network/src/network/packet/ClassID.h	(revision 2758)
@@ -52,10 +52,5 @@
   bool process();
 
-//   uint32_t getClassID();
-//   uint32_t getClassNameLength(){ return classNameLength_; }
-//   const char *getClassName(){ return (const char*)(data_+_CLASSNAME); }
 private:
-//   uint32_t classNameLength_;
-//   static bool alreadySetOneClassID_;
 };
 
Index: code/branches/network/src/network/packet/Gamestate.cc
===================================================================
--- code/branches/network/src/network/packet/Gamestate.cc	(revision 2757)
+++ code/branches/network/src/network/packet/Gamestate.cc	(revision 2758)
@@ -48,8 +48,4 @@
 #define PACKET_FLAG_GAMESTATE  ENET_PACKET_FLAG_RELIABLE
 
-// Gamestate::Gamestate()
-// {
-//   flags_ = flags_ | PACKET_FLAG_GAMESTATE;
-// }
 
 Gamestate::Gamestate()
@@ -127,8 +123,6 @@
 #endif
 
-    //if(it->doSelection(id))
     if ( it->doSync( id, mode ) )
       dataMap_.push_back( obj(it->getObjectID(), it->getCreatorID(), tempsize, mem-data_) );
-//     dataMap_[mem-data_]=(*it);  // save the mem location of the synchronisable data
     if(!it->getData(mem, id, mode))
       return false; // mem pointer gets automatically increased because of call by reference
@@ -158,6 +152,4 @@
   assert(!header_->isDiffed());
   uint8_t *mem=data_+GamestateHeader::getSize();
-    // get the start of the Synchronisable list
-  //ObjectList<Synchronisable>::iterator it=ObjectList<Synchronisable>::begin();
   Synchronisable *s;
 
@@ -177,13 +169,8 @@
         mem += objectheader.getDataSize();
       }
-//         COUT(0) << "could not fabricate synchronisable: " << objectheader->objectID << " classid: " << objectheader->classID << " creator: " << objectheader->creatorID << endl;
-//       else
-//         COUT(0) << "fabricated: " << objectheader->objectID << " classid: " << objectheader->classID << " creator: "  << objectheader->creatorID << endl;
     }
     else
     {
       bool b = s->updateData(mem, mode);
-//      if(!b)
-//        COUT(0) << "data could not be updated" << endl;
       assert(b);
     }
@@ -262,5 +249,4 @@
   uint8_t *ndata = new uint8_t[buffer+GamestateHeader::getSize()];
   uint8_t *dest = ndata + GamestateHeader::getSize();
-  //unsigned char *dest = new unsigned char[buffer];
   uint8_t *source = data_ + GamestateHeader::getSize();
   int retval;
@@ -294,5 +280,4 @@
   uint32_t compsize = header_->getCompSize();
   uint32_t bufsize;
-//  assert(compsize<=datasize);
   bufsize = datasize;
   assert(bufsize!=0);
@@ -340,5 +325,4 @@
   assert(!header_->isDiffed());
   GamestateHeader diffHeader(base->data_);
-  //unsigned char *basep = base->getGs()/*, *gs = getGs()*/;
   uint8_t *basep = GAMESTATE_START(base->data_), *gs = GAMESTATE_START(this->data_);
   uint32_t of=0; // pointers offset
@@ -397,8 +381,4 @@
   //copy in the zeros
   for(it=dataMap_.begin(); it!=dataMap_.end();){
-//    if((*it).objSize==0)
-//      continue;
-//    if(it->second->getSize(HEADER->id)==0) // merged from objecthierarchy2, doesn't work anymore; TODO: change this
-//      continue;                            // merged from objecthierarchy2, doesn't work anymore; TODO: change this
     SynchronisableHeader oldobjectheader(origdata);
     SynchronisableHeader newobjectheader(newdata);
@@ -408,6 +388,4 @@
       continue;
     }
-//     object = Synchronisable::getSynchronisable( (*it).objID );
-//     assert(object->objectID == oldobjectheader->objectID);
     objectsize = oldobjectheader.getDataSize();
     objectOffset=SynchronisableHeader::getSize(); //skip the size and the availableData variables in the objectheader
@@ -447,5 +425,4 @@
   assert(header_->isDiffed());
   assert(!header_->isCompressed() && !base->header_->isCompressed());
-  //unsigned char *basep = base->getGs()/*, *gs = getGs()*/;
   uint8_t *basep = GAMESTATE_START(base->data_);
   uint8_t *gs = GAMESTATE_START(this->data_);
Index: code/branches/network/src/network/packet/Gamestate.h
===================================================================
--- code/branches/network/src/network/packet/Gamestate.h	(revision 2757)
+++ code/branches/network/src/network/packet/Gamestate.h	(revision 2758)
@@ -93,7 +93,4 @@
   private:
     uint8_t *data_;
-//#define GAMESTATE_START(data) (data + sizeof(GamestateHeader))
-//#define GAMESTATE_HEADER(data) ((GamestateHeader *)data)
-//#define HEADER GAMESTATE_HEADER(data_)
 
 };
Index: code/branches/network/src/network/synchronisable/Synchronisable.cc
===================================================================
--- code/branches/network/src/network/synchronisable/Synchronisable.cc	(revision 2757)
+++ code/branches/network/src/network/synchronisable/Synchronisable.cc	(revision 2758)
@@ -100,8 +100,4 @@
       if (this->objectMode_ != 0x0 && (Host::running() && Host::isServer()))
         deletedObjects_.push(objectID);
-//       COUT(3) << "destruct synchronisable +++" << objectID << " | " << classID << std::endl;
-//       COUT(3) << " bump ---" << objectID << " | " << &objectMap_ << std::endl;
-//       assert(objectMap_[objectID]->objectID==objectID);
-//       objectMap_.erase(objectID);
     }
     std::map<uint32_t, Synchronisable*>::iterator it;
@@ -110,16 +106,4 @@
       objectMap_.erase(it);
 
-    //HACK HACK HACK HACK HACK HACK
-    // this hack ensures that children of this object also get destroyed
-//     ObjectList<Synchronisable>::iterator it2, it3;
-//     // get total size of gamestate
-//     for(it2 = ObjectList<Synchronisable>::begin(); it2; ++it2)
-//     {
-//       if ( it2->getCreatorID() == this->objectID && it2->getCreatorID() != OBJECTID_UNKNOWN )
-//       {
-//         Synchronisable::deleteObject( it2->getObjectID() );
-//       }
-//     }
-    //HACK HACK HACK HACK HACK HACK
   }
 
@@ -205,9 +189,7 @@
    */
   bool Synchronisable::deleteObject(uint32_t objectID){
-//     assert(getSynchronisable(objectID));
     if(!getSynchronisable(objectID))
       return false;
     assert(getSynchronisable(objectID)->objectID==objectID);
-//     delete objectMap_[objectID];
     Synchronisable *s = getSynchronisable(objectID);
     if(s)
@@ -260,5 +242,4 @@
     if(!doSync(id, mode))
       return true;
-    //std::cout << "inside getData" << std::endl;
     uint32_t tempsize = 0;
     if (this->classID==0)
@@ -269,5 +250,4 @@
 
     assert(this->classID==this->getIdentifier()->getNetworkID());
-//     this->classID=this->getIdentifier()->getNetworkID(); // TODO: correct this
     std::list<SynchronisableVariableBase*>::iterator i;
     uint32_t size;
@@ -307,6 +287,4 @@
       mode=state_;
     std::list<SynchronisableVariableBase *>::iterator i;
-    //assert(objectMode_!=0x0);
-    //assert( (mode ^ objectMode_) != 0);
     if(syncList.empty()){
       assert(0);
Index: code/branches/network/src/network/synchronisable/Synchronisable.h
===================================================================
--- code/branches/network/src/network/synchronisable/Synchronisable.h	(revision 2757)
+++ code/branches/network/src/network/synchronisable/Synchronisable.h	(revision 2758)
@@ -142,5 +142,4 @@
   protected:
     Synchronisable(BaseObject* creator);
-//     void registerVariable(void *var, int size, variableType t, uint8_t mode=0x1, NetworkCallbackBase *cb=0);
     template <class T> void registerVariable(T& variable, uint8_t mode=0x1, NetworkCallbackBase *cb=0, bool bidirectional=false);
     template <class T> void unregisterVariable(T& var);
@@ -205,6 +204,4 @@
   template <> _NetworkExport void Synchronisable::registerVariable( const Quaternion& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional);
   template <> _NetworkExport void Synchronisable::registerVariable( Quaternion& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional);
-//   template <> _NetworkExport void Synchronisable::registerVariable( LODParticle::LOD& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional);
-//   template <> _NetworkExport void Synchronisable::registerVariable( Ogre::Light::LightTypes& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional);
 }
 
