Index: code/branches/netp3/src/network/Client.cc
===================================================================
--- code/branches/netp3/src/network/Client.cc	(revision 3082)
+++ code/branches/netp3/src/network/Client.cc	(revision 3083)
@@ -149,5 +149,5 @@
         COUT(4) << "popping partial gamestate: " << std::endl;
         packet::Gamestate *gs = gamestate.getGamestate();
-        assert(gs);
+        //assert(gs); <--- there might be the case that no data has to be sent, so its commented out now
         if(gs){
           COUT(4) << "client tick: sending gs " << gs << std::endl;
Index: code/branches/netp3/src/network/TrafficControl.cc
===================================================================
--- code/branches/netp3/src/network/TrafficControl.cc	(revision 3082)
+++ code/branches/netp3/src/network/TrafficControl.cc	(revision 3083)
@@ -121,5 +121,5 @@
 
 
-	void TrafficControl::processObjectList(unsigned int clientID, unsigned int gamestateID, std::vector<obj>& list)
+	void TrafficControl::processObjectList(unsigned int clientID, unsigned int gamestateID, std::list<obj>& list)
 	{
 	  currentClientID=clientID;
@@ -137,5 +137,5 @@
 	void TrafficControl::ack(unsigned int clientID, unsigned int gamestateID)
 	{
-	  std::vector<obj>::iterator itvec;  // iterator to iterate through the acked objects
+	  std::list<obj>::iterator itvec;  // iterator to iterate through the acked objects
 
     //assertions to make sure the maps already exist
@@ -146,5 +146,5 @@
     // shortcut for maps
     std::map<unsigned int, objInfo >& objectListPerm = clientListPerm_[clientID];
-    std::map<unsigned int, std::vector<obj> >& objectListTemp = clientListTemp_[clientID];
+    std::map<unsigned int, std::list<obj> >& objectListTemp = clientListTemp_[clientID];
 
     for(itvec = objectListTemp[gamestateID].begin(); itvec != objectListTemp[gamestateID].end(); itvec++)
@@ -187,7 +187,7 @@
   * takes the shortened list which will be sent to the gsmanager and puts the *info into clientListTemp
   */
-  void TrafficControl::updateClientListTemp(std::vector<obj>& list)
-  {
-    clientListTemp_[currentClientID][currentGamestateID] = std::vector<obj>(list);
+  void TrafficControl::updateClientListTemp(std::list<obj>& list)
+  {
+    clientListTemp_[currentClientID][currentGamestateID] = std::list<obj>(list);
   }
 
@@ -196,8 +196,8 @@
   *takes the current list that has to be returned to the gsmanager and shortens it in criteria of bandwidth of clientID(XY)
   */
-  void TrafficControl::cut(std::vector<obj>& list, unsigned int targetsize)
+  void TrafficControl::cut(std::list<obj>& list, unsigned int targetsize)
   {
     unsigned int size=0;
-    std::vector<obj>::iterator itvec, ittemp;
+    std::list<obj>::iterator itvec, ittemp;
     assert(!list.empty());
     for(itvec = list.begin(); itvec != list.end();)
@@ -212,5 +212,6 @@
       {
         clientListPerm_[currentClientID][(*itvec).objID].objValueSched += SCHED_PRIORITY_OFFSET; // NOTE: SCHED_PRIORITY_OFFSET is negative
-        list.erase(itvec++);
+        list.erase(itvec, list.end());
+        break;
       }
 //       printList(list, currentClientID);
@@ -223,5 +224,5 @@
 	*evaluateList evaluates whether new obj are there, whether there are things to be updatet and manipulates all this.
 	*/
-	void TrafficControl::evaluateList(unsigned int clientID, std::vector<obj>& list)
+	void TrafficControl::evaluateList(unsigned int clientID, std::list<obj>& list)
 	{
 
@@ -230,5 +231,5 @@
 	  //compare listToProcess vs clientListPerm
     //if listToProcess contains new Objects, add them to clientListPerm
-    std::vector<obj>::iterator itvec;
+    std::list<obj>::iterator itvec;
     
     std::map<unsigned int, objInfo >& objectListPerm = clientListPerm_[clientID];
@@ -256,9 +257,11 @@
       //sort copied list according to priorities
       // use boost bind here because we need to pass a memberfunction to stl sort
-      sort( list.begin(), list.end(), boost::bind(&TrafficControl::prioritySort, this, clientID, _1, _2) );
+//       sort( list.begin(), list.end(), boost::bind(&TrafficControl::prioritySort, this, clientID, _1, _2) );
+      list.sort( boost::bind(&TrafficControl::prioritySort, this, clientID, _1, _2) );
+      
 //       list.sort(boost::bind(&TrafficControl::prioritySort, this, clientID, _1, _2) );
 
       //now we check, that the creator of an object always exists on a client
-      std::vector<obj>::iterator itcreator;
+      std::list<obj>::iterator itcreator;
       for(itvec = list.begin(); itvec != list.end(); itvec++)
       {
@@ -269,7 +272,7 @@
 //       printList(list, clientID);
       cut(list, targetSize);
-
       //now sort again after objDataOffset
-      sort(list.begin(), list.end(), boost::bind(&TrafficControl::dataSort, this, _1, _2) );
+//       sort(list.begin(), list.end(), boost::bind(&TrafficControl::dataSort, this, _1, _2) );
+      list.sort( boost::bind(&TrafficControl::dataSort, this, _1, _2) );
     }
     //diese Funktion updateClientList muss noch gemacht werden
@@ -278,7 +281,7 @@
   }
 
-  void TrafficControl::printList(std::vector<obj>& list, unsigned int clientID)
-  {
-    std::vector<obj>::iterator it;
+  void TrafficControl::printList(std::list<obj>& list, unsigned int clientID)
+  {
+    std::list<obj>::iterator it;
     COUT(0) << "=========== Objectlist ===========" << endl;
     for( it=list.begin(); it!=list.end(); it++)
@@ -286,5 +289,5 @@
   }
 
-  void TrafficControl::fixCreatorDependencies(std::vector<obj>::iterator it1, std::vector<obj>& list, unsigned int clientID)
+  void TrafficControl::fixCreatorDependencies(std::list<obj>::iterator it1, std::list<obj>& list, unsigned int clientID)
   {
     if ( (*it1).objCreatorID == OBJECTID_UNKNOWN )
@@ -292,5 +295,5 @@
     if( clientListPerm_[clientID][(*it1).objCreatorID].objCurGS != GAMESTATEID_INITIAL )
       return;
-    std::vector<obj>::iterator it2, it3=it1;
+    std::list<obj>::iterator it2, it3=it1;
     for( it2 = ++it3; it2 != list.end(); it2++ )
     {
Index: code/branches/netp3/src/network/TrafficControl.h
===================================================================
--- code/branches/netp3/src/network/TrafficControl.h	(revision 3082)
+++ code/branches/netp3/src/network/TrafficControl.h	(revision 3083)
@@ -32,5 +32,5 @@
 
 #include <string>
-#include <vector>
+#include <list>
 #include <map>
 #include <utility>
@@ -91,5 +91,5 @@
     *temporary client list: contains client ids, gamestate ids and object ids (in this order)
     */
-    std::map<unsigned int, std::map<unsigned int, std::vector<obj> > > clientListTemp_;
+    std::map<unsigned int, std::map<unsigned int, std::list<obj> > > clientListTemp_;
 
     /**updateReferenceList
@@ -103,10 +103,10 @@
     void insertinClientListPerm(unsigned int clientID, obj objinf);
     
-    void cut(std::vector<obj>& list, unsigned int targetsize);
-    void updateClientListTemp(std::vector<obj>& list);//done
+    void cut(std::list<obj>& list, unsigned int targetsize);
+    void updateClientListTemp(std::list<obj>& list);//done
     /**
     *evaluates Data given (list) and produces result(->Data to be updated)
     */
-    void evaluateList(unsigned int clientID, std::vector<obj>& list);//done    
+    void evaluateList(unsigned int clientID, std::list<obj>& list);//done    
     void ack(unsigned int clientID, unsigned int gamestateID);  // this function gets called when the server receives an ack from the client
     
@@ -130,5 +130,5 @@
     void setConfigValues();
     static TrafficControl *getInstance();
-    void processObjectList(unsigned int clientID, unsigned int gamestateID, std::vector<obj>& list); //gets a pointer to the list (containing objectIDs) and sorts it
+    void processObjectList(unsigned int clientID, unsigned int gamestateID, std::list<obj>& list); //gets a pointer to the list (containing objectIDs) and sorts it
     static void processAck(unsigned int clientID, unsigned int gamestateID)
     { return instance_->ack(clientID, gamestateID); }
@@ -137,6 +137,6 @@
     bool prioritySort(uint32_t clientID, obj i, obj j);
     bool dataSort(obj i, obj j);
-    void printList(std::vector<obj>& list, unsigned int clientID);
-    void fixCreatorDependencies(std::vector<obj>::iterator it, std::vector<obj>& list, unsigned int clientID);
+    void printList(std::list<obj>& list, unsigned int clientID);
+    void fixCreatorDependencies(std::list<obj>::iterator it, std::list<obj>& list, unsigned int clientID);
 };
 
Index: code/branches/netp3/src/network/packet/Gamestate.cc
===================================================================
--- code/branches/netp3/src/network/packet/Gamestate.cc	(revision 3082)
+++ code/branches/netp3/src/network/packet/Gamestate.cc	(revision 3083)
@@ -182,5 +182,5 @@
 #ifndef NDEBUG
   if(this->getID()%1000==0){
-    std::vector<uint32_t> v1;
+    std::list<uint32_t> v1;
     ObjectList<Synchronisable>::iterator it;
     for (it = ObjectList<Synchronisable>::begin(); it != ObjectList<Synchronisable>::end(); ++it) {
@@ -194,5 +194,5 @@
       }
       else {
-        std::vector<uint32_t>::iterator it2;
+        std::list<uint32_t>::iterator it2;
         for (it2 = v1.begin(); it2 != v1.end(); ++it2) {
           if (it->getObjectID() == *it2) {
@@ -412,5 +412,5 @@
 Gamestate* Gamestate::doSelection(unsigned int clientID, unsigned int targetSize){
   assert(data_);
-  std::vector<obj>::iterator it;
+  std::list<obj>::iterator it;
 
   // allocate memory for new data
@@ -434,4 +434,9 @@
 
   //copy in the zeros
+//   std::list<obj>::iterator itt;
+//   COUT(0) << "myvector contains:";
+//   for ( itt=dataVector_.begin() ; itt!=dataVector_.end(); itt++ )
+//     COUT(0) << " " << (*itt).objID;
+//   COUT(0) << endl;
   for(it=dataVector_.begin(); it!=dataVector_.end();){
     SynchronisableHeader oldobjectheader(origdata);
Index: code/branches/netp3/src/network/packet/Gamestate.h
===================================================================
--- code/branches/netp3/src/network/packet/Gamestate.h	(revision 3082)
+++ code/branches/netp3/src/network/packet/Gamestate.h	(revision 3083)
@@ -129,5 +129,5 @@
   private:
     uint32_t calcGamestateSize(int32_t id, uint8_t mode=0x0);
-    std::vector<obj> dataVector_;
+    std::list<obj> dataVector_;
     GamestateHeader* header_;
 };
