Index: code/branches/netp2/src/network/FunctionCallManager.cc
===================================================================
--- code/branches/netp2/src/network/FunctionCallManager.cc	(revision 2948)
+++ code/branches/netp2/src/network/FunctionCallManager.cc	(revision 2949)
@@ -34,5 +34,7 @@
 std::map<uint32_t, packet::FunctionCalls*> FunctionCallManager::clientMap_;
 
-void FunctionCallManager::addCallStatic(uint32_t functionID, uint32_t clientID, MultiType* mt1, MultiType* mt2, MultiType* mt3, MultiType* mt4, MultiType* mt5)
+// Static calls
+
+void FunctionCallManager::addCallStatic(uint32_t functionID, uint32_t clientID)
 {  
   if(clientMap_.find(clientID)==clientMap_.end()) 
@@ -41,8 +43,56 @@
     FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 
   } 
-  FunctionCallManager::	clientMap_[clientID]->addCallStatic(functionID, mt1, mt2, mt3, mt4, mt5);
+  FunctionCallManager::	clientMap_[clientID]->addCallStatic(functionID);
+}
+void FunctionCallManager::addCallStatic(uint32_t functionID, uint32_t clientID, const MultiType& mt1)
+{  
+  if(clientMap_.find(clientID)==clientMap_.end()) 
+  {
+    FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 
+    FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 
+  } 
+  FunctionCallManager:: clientMap_[clientID]->addCallStatic(functionID, &mt1);
+}
+void FunctionCallManager::addCallStatic(uint32_t functionID, uint32_t clientID, const MultiType& mt1, const MultiType& mt2)
+{  
+  if(clientMap_.find(clientID)==clientMap_.end()) 
+  {
+    FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 
+    FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 
+  } 
+  FunctionCallManager:: clientMap_[clientID]->addCallStatic(functionID, &mt1, &mt2);
+}
+void FunctionCallManager::addCallStatic(uint32_t functionID, uint32_t clientID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3)
+{  
+  if(clientMap_.find(clientID)==clientMap_.end()) 
+  {
+    FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 
+    FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 
+  } 
+  FunctionCallManager:: clientMap_[clientID]->addCallStatic(functionID, &mt1, &mt2, &mt3);
+}
+void FunctionCallManager::addCallStatic(uint32_t functionID, uint32_t clientID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4)
+{  
+  if(clientMap_.find(clientID)==clientMap_.end()) 
+  {
+    FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 
+    FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 
+  } 
+  FunctionCallManager:: clientMap_[clientID]->addCallStatic(functionID, &mt1, &mt2, &mt3, &mt4);
+}
+void FunctionCallManager::addCallStatic(uint32_t functionID, uint32_t clientID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4, const MultiType& mt5)
+{  
+  if(clientMap_.find(clientID)==clientMap_.end()) 
+  {
+    FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 
+    FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 
+  } 
+  FunctionCallManager:: clientMap_[clientID]->addCallStatic(functionID, &mt1, &mt2, &mt3, &mt4, &mt5);
 }
 
-void FunctionCallManager::addCallMember(uint32_t functionID, uint32_t objectID, uint32_t clientID, MultiType* mt1, MultiType* mt2, MultiType* mt3, MultiType* mt4, MultiType* mt5)
+
+// MemberCalls
+
+void FunctionCallManager::addCallMember(uint32_t functionID, uint32_t objectID, uint32_t clientID)
 { 
   if(clientMap_.find(clientID)==clientMap_.end()) 
@@ -51,6 +101,53 @@
     FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 
   } 
-  FunctionCallManager::clientMap_[clientID]->addCallMember(functionID, objectID, mt1, mt2, mt3, mt4, mt5);
+  FunctionCallManager::clientMap_[clientID]->addCallMember(functionID, objectID);
 }
+void FunctionCallManager::addCallMember(uint32_t functionID, uint32_t objectID, uint32_t clientID, const MultiType& mt1)
+{ 
+  if(clientMap_.find(clientID)==clientMap_.end()) 
+  {
+    FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 
+    FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 
+  } 
+  FunctionCallManager::clientMap_[clientID]->addCallMember(functionID, objectID, &mt1);
+}
+void FunctionCallManager::addCallMember(uint32_t functionID, uint32_t objectID, uint32_t clientID, const MultiType& mt1, const MultiType& mt2)
+{ 
+  if(clientMap_.find(clientID)==clientMap_.end()) 
+  {
+    FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 
+    FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 
+  } 
+  FunctionCallManager::clientMap_[clientID]->addCallMember(functionID, objectID, &mt1, &mt2);
+}
+void FunctionCallManager::addCallMember(uint32_t functionID, uint32_t objectID, uint32_t clientID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3)
+{ 
+  if(clientMap_.find(clientID)==clientMap_.end()) 
+  {
+    FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 
+    FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 
+  } 
+  FunctionCallManager::clientMap_[clientID]->addCallMember(functionID, objectID, &mt1, &mt2, &mt3);
+}
+void FunctionCallManager::addCallMember(uint32_t functionID, uint32_t objectID, uint32_t clientID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4)
+{ 
+  if(clientMap_.find(clientID)==clientMap_.end()) 
+  {
+    FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 
+    FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 
+  } 
+  FunctionCallManager::clientMap_[clientID]->addCallMember(functionID, objectID, &mt1, &mt2, &mt3, &mt4);
+}
+void FunctionCallManager::addCallMember(uint32_t functionID, uint32_t objectID, uint32_t clientID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4, const MultiType& mt5)
+{ 
+  if(clientMap_.find(clientID)==clientMap_.end()) 
+  {
+    FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls; 
+    FunctionCallManager::clientMap_[clientID]->setClientID(clientID); 
+  } 
+  FunctionCallManager::clientMap_[clientID]->addCallMember(functionID, objectID, &mt1, &mt2, &mt3, &mt4, &mt5);
+}
+
+// Send calls
 
 void FunctionCallManager::sendCalls()
Index: code/branches/netp2/src/network/FunctionCallManager.h
===================================================================
--- code/branches/netp2/src/network/FunctionCallManager.h	(revision 2948)
+++ code/branches/netp2/src/network/FunctionCallManager.h	(revision 2949)
@@ -18,6 +18,18 @@
 {
 public:
-  static void addCallStatic(uint32_t functionID, uint32_t clientID, MultiType* mt1=0, MultiType* mt2=0, MultiType* mt3=0, MultiType* mt4=0, MultiType* mt5=0);
-  static void addCallMember(uint32_t functionID, uint32_t objectID, uint32_t clientID, MultiType* mt1=0, MultiType* mt2=0, MultiType* mt3=0, MultiType* mt4=0, MultiType* mt5=0);
+  static void addCallStatic(uint32_t functionID, uint32_t clientID);
+  static void addCallStatic(uint32_t functionID, uint32_t clientID, const MultiType& mt1);
+  static void addCallStatic(uint32_t functionID, uint32_t clientID, const MultiType& mt1, const MultiType& mt2);
+  static void addCallStatic(uint32_t functionID, uint32_t clientID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3);
+  static void addCallStatic(uint32_t functionID, uint32_t clientID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4);
+  static void addCallStatic(uint32_t functionID, uint32_t clientID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4, const MultiType& mt5);
+  
+  static void addCallMember(uint32_t functionID, uint32_t objectID, uint32_t clientID);
+  static void addCallMember(uint32_t functionID, uint32_t objectID, uint32_t clientID, const MultiType& mt1);
+  static void addCallMember(uint32_t functionID, uint32_t objectID, uint32_t clientID, const MultiType& mt1, const MultiType& mt2);
+  static void addCallMember(uint32_t functionID, uint32_t objectID, uint32_t clientID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3);
+  static void addCallMember(uint32_t functionID, uint32_t objectID, uint32_t clientID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4);
+  static void addCallMember(uint32_t functionID, uint32_t objectID, uint32_t clientID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4, const MultiType& mt5);
+  
   static void sendCalls();
   
Index: code/branches/netp2/src/network/Server.cc
===================================================================
--- code/branches/netp2/src/network/Server.cc	(revision 2948)
+++ code/branches/netp2/src/network/Server.cc	(revision 2949)
@@ -351,4 +351,5 @@
     // now synchronise functionIDs
     packet::FunctionIDs *fIDs = new packet::FunctionIDs();
+    fIDs->setClientID(clientID);
     bool b = fIDs->send();
     assert(b);
Index: code/branches/netp2/src/network/packet/FunctionCalls.cc
===================================================================
--- code/branches/netp2/src/network/packet/FunctionCalls.cc	(revision 2948)
+++ code/branches/netp2/src/network/packet/FunctionCalls.cc	(revision 2949)
@@ -171,5 +171,5 @@
 }
 
-void FunctionCalls::addCallStatic( uint32_t networkID, MultiType* mt1, MultiType* mt2, MultiType* mt3, MultiType* mt4, MultiType* mt5){
+void FunctionCalls::addCallStatic( uint32_t networkID, const MultiType* mt1, const MultiType* mt2, const MultiType* mt3, const MultiType* mt4, const MultiType* mt5){
   assert(!isDataENetAllocated());
   
@@ -245,5 +245,5 @@
 }
 
-void FunctionCalls::addCallMember( uint32_t networkID, uint32_t objectID, MultiType* mt1, MultiType* mt2, MultiType* mt3, MultiType* mt4, MultiType* mt5){
+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());
   
Index: code/branches/netp2/src/network/packet/FunctionCalls.h
===================================================================
--- code/branches/netp2/src/network/packet/FunctionCalls.h	(revision 2948)
+++ code/branches/netp2/src/network/packet/FunctionCalls.h	(revision 2949)
@@ -32,6 +32,6 @@
   bool process();
 
-  void addCallStatic( uint32_t networkID, MultiType* mt1=0, MultiType* mt2=0, MultiType* mt3=0, MultiType* mt4=0, MultiType* mt5=0);
-  void addCallMember( uint32_t networkID, uint32_t objectID, MultiType* mt1=0, MultiType* mt2=0, MultiType* mt3=0, MultiType* mt4=0, MultiType* mt5=0);
+  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);
 private:
   uint32_t nrOfCalls_;
Index: code/branches/netp2/src/orxonox/objects/Test.cc
===================================================================
--- code/branches/netp2/src/orxonox/objects/Test.cc	(revision 2948)
+++ code/branches/netp2/src/orxonox/objects/Test.cc	(revision 2949)
@@ -33,4 +33,5 @@
 #include "network/NetworkFunction.h"
 #include "Test.h"
+#include "util/MultiType.h"
 
 namespace orxonox
@@ -43,4 +44,5 @@
   SetConsoleCommand(Test, printV4, true).accessLevel(AccessLevel::User);
   SetConsoleCommand(Test, call, true).accessLevel(AccessLevel::User);
+  SetConsoleCommand(Test, call2, true).accessLevel(AccessLevel::User);
   
   
@@ -51,4 +53,5 @@
   registerStaticNetworkFunction( &Test::printV1 );
   registerMemberNetworkFunction( Test, checkU1 );
+  registerMemberNetworkFunction( Test, printBlaBla );
   
   Test* Test::instance_ = 0;
@@ -102,9 +105,31 @@
   }
   
+  void Test::call2(unsigned int clientID, std::string s1, std::string s2, std::string s3, std::string s4)
+  {
+    callMemberNetworkFunction( Test, printBlaBla, this->getObjectID(), clientID, s1, s2, s3, s4, s4 );
+  }
+  
   void Test::tick(float dt)
   {
+//     std::string str1 = "blub";
+//     //MultiType mt1(std::string("blub"));
+//     MultiType mt1(str1);
+//     uint8_t* mem = new uint8_t[mt1.getNetworkSize()];
+//     uint8_t* temp = mem;
+//     mt1.exportData( temp );
+//     assert( temp-mem == mt1.getNetworkSize() );
+//     MultiType mt2;
+//     temp = mem;
+//     mt2.importData( temp );
+//     assert( temp-mem == mt1.getNetworkSize() );
+//     COUT(0) << mt2 << endl;
     if(!Core::isMaster())
-      callMemberNetworkFunction( Test, checkU1, this->getObjectID(), 0 );
-//       callMemberNetworkFunction( &Test::printV1, this->getObjectID(), 0);
+      call2(0, "bal", "a", "n", "ce");
+//       callMemberNetworkFunction( Test, checkU1, this->getObjectID(), 0 );
+  }
+  
+  void Test::printBlaBla(std::string s1, std::string s2, std::string s3, std::string s4, std::string s5)
+  {
+    COUT(0) << s1 << s2 << s3 << s4 << s5 << endl;
   }
   
Index: code/branches/netp2/src/orxonox/objects/Test.h
===================================================================
--- code/branches/netp2/src/orxonox/objects/Test.h	(revision 2948)
+++ code/branches/netp2/src/orxonox/objects/Test.h	(revision 2949)
@@ -52,4 +52,5 @@
       
       static void call(unsigned int clientID);
+      void call2(unsigned int clientID, std::string s1, std::string s2, std::string s3, std::string s4);
       virtual void tick(float dt);
 
@@ -79,4 +80,6 @@
       static void printV3(){ instance_->checkU3(); }
       static void printV4(){ instance_->checkU4(); }
+      
+      void printBlaBla(std::string s1, std::string s2, std::string s3, std::string s4, std::string s5);
 
     private:
Index: code/branches/netp2/src/orxonox/objects/worldentities/pawns/Pawn.cc
===================================================================
--- code/branches/netp2/src/orxonox/objects/worldentities/pawns/Pawn.cc	(revision 2948)
+++ code/branches/netp2/src/orxonox/objects/worldentities/pawns/Pawn.cc	(revision 2949)
@@ -39,8 +39,11 @@
 #include "objects/worldentities/ParticleSpawner.h"
 #include "objects/worldentities/ExplosionChunk.h"
+#include "network/NetworkFunction.h"
 
 namespace orxonox
 {
     CreateFactory(Pawn);
+    
+    registerMemberNetworkFunction( Pawn, doFire );
 
     Pawn::Pawn(BaseObject* creator) : ControllableEntity(creator)
@@ -117,15 +120,15 @@
         SUPER(Pawn, tick, dt);
 
-        if (this->weaponSystem_)
-        {
-            if (this->fire_ & WeaponMode::fire)
-                this->weaponSystem_->fire(WeaponMode::fire);
-            if (this->fire_ & WeaponMode::altFire)
-                this->weaponSystem_->fire(WeaponMode::altFire);
-            if (this->fire_ & WeaponMode::altFire2)
-                this->weaponSystem_->fire(WeaponMode::altFire2);
-        }
-        this->fire_ = this->firehack_;
-        this->firehack_ = 0x0;
+//         if (this->weaponSystem_)
+//         {
+//             if (this->fire_ & WeaponMode::fire)
+//                 this->weaponSystem_->fire(WeaponMode::fire);
+//             if (this->fire_ & WeaponMode::altFire)
+//                 this->weaponSystem_->fire(WeaponMode::altFire);
+//             if (this->fire_ & WeaponMode::altFire2)
+//                 this->weaponSystem_->fire(WeaponMode::altFire2);
+//         }
+//         this->fire_ = this->firehack_;
+//         this->firehack_ = 0x0;
 
         if (Core::isMaster())
@@ -256,5 +259,20 @@
     void Pawn::fire(WeaponMode::Enum fireMode)
     {
-        this->firehack_ |= fireMode;
+        doFire(fireMode);
+    }
+    
+    void Pawn::doFire(uint8_t fireMode)
+    {
+        if(Core::isMaster())
+        {
+            if (this->weaponSystem_)
+                this->weaponSystem_->fire((WeaponMode::Enum)fireMode);
+        }
+        else
+        {
+            callMemberNetworkFunction( Pawn, doFire, this->getObjectID(), 0, ((uint8_t)fireMode));
+            if (this->weaponSystem_)
+                this->weaponSystem_->fire((WeaponMode::Enum)fireMode);
+        }
     }
 
Index: code/branches/netp2/src/orxonox/objects/worldentities/pawns/Pawn.h
===================================================================
--- code/branches/netp2/src/orxonox/objects/worldentities/pawns/Pawn.h	(revision 2948)
+++ code/branches/netp2/src/orxonox/objects/worldentities/pawns/Pawn.h	(revision 2949)
@@ -80,4 +80,5 @@
 
             virtual void fire(WeaponMode::Enum fireMode);
+            virtual void doFire(uint8_t fireMode);
             virtual void postSpawn();
 
Index: code/branches/netp2/src/util/MultiType.h
===================================================================
--- code/branches/netp2/src/util/MultiType.h	(revision 2948)
+++ code/branches/netp2/src/util/MultiType.h	(revision 2949)
@@ -80,28 +80,28 @@
     enum MT_Type
     {
-        MT_null,
-        MT_char,
-        MT_uchar,
-        MT_short,
-        MT_ushort,
-        MT_int,
-        MT_uint,
-        MT_long,
-        MT_ulong,
-        MT_longlong,
-        MT_ulonglong,
-        MT_float,
-        MT_double,
-        MT_longdouble,
-        MT_bool,
-        MT_void,
-        MT_string,
-        MT_vector2,
-        MT_vector3,
-        MT_vector4,
-        MT_colourvalue,
-        MT_quaternion,
-        MT_radian,
-        MT_degree
+        MT_null=0,
+        MT_char=1,
+        MT_uchar=2,
+        MT_short=3,
+        MT_ushort=4,
+        MT_int=5,
+        MT_uint=6,
+        MT_long=7,
+        MT_ulong=8,
+        MT_longlong=9,
+        MT_ulonglong=10,
+        MT_float=11,
+        MT_double=12,
+        MT_longdouble=13,
+        MT_bool=14,
+        MT_void=15,
+        MT_string=16,
+        MT_vector2=17,
+        MT_vector3=18,
+        MT_vector4=19,
+        MT_colourvalue=20,
+        MT_quaternion=21,
+        MT_radian=22,
+        MT_degree=23
     };
 
@@ -326,12 +326,12 @@
             
             /** @brief Saves the value of the MT to a bytestream (pointed at by mem) and increases mem pointer by size of MT */
-            inline void                       importData(uint8_t*& mem) { assert(sizeof(MT_Type)<=8); *(uint8_t*)(mem) = this->getType(); mem+=sizeof(uint8_t); this->value_->importData(mem); }
+            inline void                       exportData(uint8_t*& mem) const { assert(sizeof(MT_Type)<=8); *(uint8_t*)(mem) = this->getType(); mem+=sizeof(uint8_t); this->value_->exportData(mem); }
             /** @brief Loads the value of the MT from a bytestream (pointed at by mem) and increases mem pointer by size of MT */
-            inline void                       exportData(uint8_t*& mem) { assert(sizeof(MT_Type)<=8); this->setType(*(uint8_t*)mem); mem+=sizeof(uint8_t); this->value_->exportData(mem); }
+            inline void                       importData(uint8_t*& mem) { assert(sizeof(MT_Type)<=8); this->setType(static_cast<MT_Type>(*(uint8_t*)mem)); mem+=sizeof(uint8_t); this->value_->importData(mem); }
             /** @brief Saves the value of the MT to a bytestream and increases pointer to bytestream by size of MT */
             inline uint8_t*&                  operator << (uint8_t*& mem) { importData(mem); return mem; }
             /** @brief Loads the value of the MT to a bytestream and increases pointer to bytestream by size of MT */
-            inline void                       operator >> (uint8_t*& mem) { exportData(mem); }
-            inline uint32_t                   getNetworkSize() { assert(this->value_); return this->value_->getSize() + sizeof(uint8_t); }
+            inline void                       operator >> (uint8_t*& mem) const { exportData(mem); }
+            inline uint32_t                   getNetworkSize() const { assert(this->value_); return this->value_->getSize() + sizeof(uint8_t); }
 
             /** @brief Checks whether the value is a default one. */
