Index: code/trunk/src/libraries/network/packet/FunctionCalls.cc
===================================================================
--- code/trunk/src/libraries/network/packet/FunctionCalls.cc	(revision 10622)
+++ code/trunk/src/libraries/network/packet/FunctionCalls.cc	(revision 10624)
@@ -82,19 +82,10 @@
 }
 
-void FunctionCalls::addCallStatic( uint32_t networkID, const MultiType* mt1, const MultiType* mt2, const MultiType* mt3, const MultiType* mt4, const MultiType* mt5)
+void FunctionCalls::addCall( uint32_t networkID, uint32_t objectID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4, const MultiType& mt5)
 {
   assert(!isDataENetAllocated());
   
   this->functionCalls_.push(orxonox::FunctionCall());
-  this->functionCalls_.back().setCallStatic( networkID, mt1, mt2, mt3, mt4, mt5 );
-  this->currentSize_ += this->functionCalls_.back().getSize();
-}
-
-void FunctionCalls::addCallMember( uint32_t networkID, uint32_t objectID, const MultiType* mt1, const MultiType* mt2, const MultiType* mt3, const MultiType* mt4, const MultiType* mt5)
-{
-  assert(!isDataENetAllocated());
-  
-  this->functionCalls_.push(orxonox::FunctionCall());
-  this->functionCalls_.back().setCallMember( networkID, objectID, mt1, mt2, mt3, mt4, mt5 );
+  this->functionCalls_.back().setCall( networkID, objectID, mt1, mt2, mt3, mt4, mt5 );
   this->currentSize_ += this->functionCalls_.back().getSize();
 }
Index: code/trunk/src/libraries/network/packet/FunctionCalls.h
===================================================================
--- code/trunk/src/libraries/network/packet/FunctionCalls.h	(revision 10622)
+++ code/trunk/src/libraries/network/packet/FunctionCalls.h	(revision 10624)
@@ -56,6 +56,5 @@
   virtual bool process(orxonox::Host* host);
 
-  void addCallStatic( uint32_t networkID, const MultiType* mt1=0, const MultiType* mt2=0, const MultiType* mt3=0, const MultiType* mt4=0, const MultiType* mt5=0);
-  void addCallMember( uint32_t networkID, uint32_t objectID, const MultiType* mt1=0, const MultiType* mt2=0, const MultiType* mt3=0, const MultiType* mt4=0, const MultiType* mt5=0);
+  void addCall( uint32_t networkID, uint32_t objectID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4, const MultiType& mt5);
   virtual bool send(orxonox::Host* host);
 private:
Index: code/trunk/src/libraries/network/packet/FunctionIDs.cc
===================================================================
--- code/trunk/src/libraries/network/packet/FunctionIDs.cc	(revision 10622)
+++ code/trunk/src/libraries/network/packet/FunctionIDs.cc	(revision 10624)
@@ -37,4 +37,5 @@
 #include "core/object/ObjectList.h"
 #include "network/NetworkFunction.h"
+#include "network/NetworkFunctionManager.h"
 
 namespace orxonox {
@@ -55,9 +56,10 @@
 
   //calculate total needed size (for all strings and integers)
-  ObjectList<NetworkFunctionBase>::iterator it;
-  for(it = ObjectList<NetworkFunctionBase>::begin(); it; ++it)
+  const std::set<NetworkFunctionBase*>& set = NetworkFunctionManager::getInstance().getAllFunctions();
+  std::set<NetworkFunctionBase*>::const_iterator it;
+  for (it = set.begin(); it != set.end(); ++it)
   {
-    const std::string& functionname = it->getName();
-    networkID = it->getNetworkID();
+    const std::string& functionname = (*it)->getName();
+    networkID = (*it)->getNetworkID();
     // now push the network id and the classname to the stack
     tempQueue.push( std::pair<unsigned int, std::string>(networkID, functionname) );
@@ -126,4 +128,7 @@
   unsigned char *functionname;
 
+  //clear the map of network ids
+  NetworkFunctionManager::getInstance().clearNetworkIDs();
+
   orxout(verbose, context::packets) << "=== processing functionids: " << endl;
   std::pair<uint32_t, std::string> tempPair;
@@ -138,5 +143,5 @@
     functionname = temp+2*sizeof(uint32_t);
     orxout(internal_info, context::packets) << "processing functionid: " << networkID << " name: " << functionname << endl;
-    NetworkFunctionBase::setNetworkID((const char*)functionname, networkID);
+    NetworkFunctionManager::getInstance().getFunctionByName((const char*)functionname)->setNetworkID(networkID);
     temp += 2*sizeof(uint32_t) + stringsize;
   }
