Index: /code/branches/presentation/src/network/GamestateManager.cc
===================================================================
--- /code/branches/presentation/src/network/GamestateManager.cc	(revision 2380)
+++ /code/branches/presentation/src/network/GamestateManager.cc	(revision 2381)
@@ -184,4 +184,5 @@
     }
     temp->setGamestateID(gamestateID);
+    TrafficControl::processAck(clientID, gamestateID);
     return true;
   }
Index: /code/branches/presentation/src/network/TrafficControl.cc
===================================================================
--- /code/branches/presentation/src/network/TrafficControl.cc	(revision 2380)
+++ /code/branches/presentation/src/network/TrafficControl.cc	(revision 2381)
@@ -128,5 +128,5 @@
 	}
 	
-	void TrafficControl::processAck(unsigned int clientID, unsigned int gamestateID)
+	void TrafficControl::ack(unsigned int clientID, unsigned int gamestateID)
 	{
 	  std::list<obj>::iterator itvec;  // iterator to iterate through the acked objects
@@ -146,4 +146,5 @@
       else
       {
+        assert(0);
         clientListPerm_[clientID][(*itvec).objID].objCurGS = gamestateID;
         clientListPerm_[clientID][(*itvec).objID].objID = (*itvec).objID;
@@ -226,5 +227,5 @@
 //     for(itvec = list.begin(); itvec!=list.end(), itvec++)
 //     {
-//       ittempgs.insert(itvec);
+//       ittempgs.insert(itvec);static
 //     }
   }
@@ -237,20 +238,25 @@
   {
     unsigned int size=0;
-    std::list<obj>::iterator itvec;
+    std::list<obj>::iterator itvec, ittemp;
     assert(!list->empty());
-    itvec = list->begin();
-    for(itvec = list->begin(); ( itvec != list->end() ) && ( size<targetsize ); itvec++)
+    for(itvec = list->begin(); itvec != list->end();)
     {
       assert( (*itvec).objSize < 1000);
-      COUT(0) << "==targetsize==  " << targetsize << endl;
+//       COUT(0) << "==targetsize==  " << targetsize << endl;
       if ( ( size + (*itvec).objSize ) < targetsize )
       {
+//         COUT(0) << "no cut" << endl;
         size += (*itvec).objSize;//objSize is given in bytes
+        ++itvec;
       }
       else
       {
-        clientListPerm_[currentClientID][(*itvec).objID].objValueSched -= SCHED_PRIORITY_OFFSET;
+//         COUT(0) << "cut" << endl;
+        clientListPerm_[currentClientID][(*itvec).objID].objValueSched += SCHED_PRIORITY_OFFSET; // NOTE: SCHED_PRIORITY_OFFSET is negative
+//         ittemp = itvec;
         list->erase(itvec++);
-      }
+//         itvec = ittemp;
+      }
+//       printList(list, currentClientID);
     }
     assert(!list->empty());
@@ -361,5 +367,5 @@
     COUT(0) << "=========== Objectlist ===========" << endl;
     for( it=list->begin(); it!=list->end(); it++)
-      COUT(0) << "ObjectID: " << (*it).objID << " creatorID: " << (*it).objCreatorID << " Priority: " << clientListPerm_[clientID][(*it).objID].objValuePerm + clientListPerm_[clientID][(*it).objID].objValueSched << endl;
+      COUT(0) << "ObjectID: " << (*it).objID << " creatorID: " << (*it).objCreatorID << " Priority: " << clientListPerm_[clientID][(*it).objID].objValuePerm + clientListPerm_[clientID][(*it).objID].objValueSched << " size: " << (*it).objSize << endl;
   }
   
Index: /code/branches/presentation/src/network/TrafficControl.h
===================================================================
--- /code/branches/presentation/src/network/TrafficControl.h	(revision 2380)
+++ /code/branches/presentation/src/network/TrafficControl.h	(revision 2381)
@@ -52,6 +52,6 @@
       uint32_t objDiffGS;//difference between current and latest GameState
       uint32_t objSize;
-      unsigned int objValuePerm;
-      unsigned int objValueSched;
+      int objValuePerm;
+      int objValueSched;
       objInfo(uint32_t ID, uint32_t creatorID, int32_t curGsID, int32_t diffGsID, uint32_t size, unsigned int prioperm, unsigned int priosched);
       objInfo();
@@ -139,4 +139,5 @@
     */
     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
 
   protected:
@@ -154,5 +155,6 @@
     void processObjectList(unsigned int clientID, unsigned int gamestateID, std::list<obj>* list); //gets a pointer to the list (containing objectIDs) and sorts it
     //done
-    void processAck(unsigned int clientID, unsigned int gamestateID);	// this function gets called when the server receives an ack from the client
+    static void processAck(unsigned int clientID, unsigned int gamestateID)
+    { return instance_->ack(clientID, gamestateID); }
     //done
     void deleteObject(unsigned int objectID);				// this function gets called when an object has been deleted (in order to clean up lists and maps)
