Index: code/branches/presentation2/src/libraries/network/NetworkPrereqs.h
===================================================================
--- code/branches/presentation2/src/libraries/network/NetworkPrereqs.h	(revision 6190)
+++ code/branches/presentation2/src/libraries/network/NetworkPrereqs.h	(revision 6192)
@@ -144,4 +144,6 @@
   template <class T>
   class NetworkCallback;
+  template <class T, class U>
+  class NetworkCallbackNotify;
   class NetworkCallbackBase;
   class NetworkCallbackManager;
Index: code/branches/presentation2/src/libraries/network/packet/DeleteObjects.cc
===================================================================
--- code/branches/presentation2/src/libraries/network/packet/DeleteObjects.cc	(revision 6190)
+++ code/branches/presentation2/src/libraries/network/packet/DeleteObjects.cc	(revision 6192)
@@ -71,5 +71,4 @@
   for(unsigned int i=0; i<number; i++){
     unsigned int temp = Synchronisable::popDeletedObject();
-//     assert(temp<10000); //ugly hack
     *reinterpret_cast<uint32_t*>(tdata) = temp;
     COUT(4) << temp << " ";
Index: code/branches/presentation2/src/libraries/network/synchronisable/CMakeLists.txt
===================================================================
--- code/branches/presentation2/src/libraries/network/synchronisable/CMakeLists.txt	(revision 6190)
+++ code/branches/presentation2/src/libraries/network/synchronisable/CMakeLists.txt	(revision 6192)
@@ -2,5 +2,4 @@
   NetworkCallbackManager.cc
   Synchronisable.cc
-  SynchronisableSpecialisations.cc
   SynchronisableVariable.cc
 )
Index: code/branches/presentation2/src/libraries/network/synchronisable/NetworkCallback.h
===================================================================
--- code/branches/presentation2/src/libraries/network/synchronisable/NetworkCallback.h	(revision 6190)
+++ code/branches/presentation2/src/libraries/network/synchronisable/NetworkCallback.h	(revision 6192)
@@ -33,6 +33,9 @@
 #include "network/NetworkPrereqs.h"
 #include "NetworkCallbackManager.h"
+// #include "util/MultiType.h"
 
 namespace orxonox{
+  
+  struct EmptyType{};
   
   class _NetworkExport NetworkCallbackBase
@@ -57,4 +60,20 @@
       void (T::*function_) (void);
   };
+  
+  template <class T, class U>
+  class NetworkCallbackNotify: public NetworkCallbackBase
+  {
+    public:
+      NetworkCallbackNotify(T* object, void (T::*function) (const U&)) : object_(object), function_(function) {}
+      NetworkCallbackNotify() {}
+      virtual ~NetworkCallbackNotify() {}
+      virtual void call()
+        { (this->object_->*function_)( this->oldValue_ ); }
+      void setOldValue(const U& value){ this->oldValue_ = value; }
+    private:
+      T* object_;
+      U oldValue_;
+      void (T::*function_) (const U&);
+  };
 
 }
Index: code/branches/presentation2/src/libraries/network/synchronisable/Synchronisable.cc
===================================================================
--- code/branches/presentation2/src/libraries/network/synchronisable/Synchronisable.cc	(revision 6190)
+++ code/branches/presentation2/src/libraries/network/synchronisable/Synchronisable.cc	(revision 6192)
@@ -390,4 +390,15 @@
   }
 
+  template <> void Synchronisable::registerVariable( std::string& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional)
+  {
+    SynchronisableVariableBase* sv;
+    if (bidirectional)
+      sv = new SynchronisableVariableBidirectional<std::string>(variable, mode, cb);
+    else
+      sv = new SynchronisableVariable<std::string>(variable, mode, cb);
+    syncList.push_back(sv);
+    stringList.push_back(sv);
+  }
+
 
 }
Index: code/branches/presentation2/src/libraries/network/synchronisable/Synchronisable.h
===================================================================
--- code/branches/presentation2/src/libraries/network/synchronisable/Synchronisable.h	(revision 6190)
+++ code/branches/presentation2/src/libraries/network/synchronisable/Synchronisable.h	(revision 6192)
@@ -138,4 +138,5 @@
     Synchronisable(BaseObject* creator);
     template <class T> void registerVariable(T& variable, uint8_t mode=0x1, NetworkCallbackBase *cb=0, bool bidirectional=false);
+    
     void setPriority(unsigned int freq){ objectFrequency_ = freq; }
 
@@ -166,20 +167,4 @@
   };
 
-  // ================= Specialisation declarations
-  
-//   template <> _NetworkExport void Synchronisable::registerVariable( const std::string& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional);
-  template <> _NetworkExport void Synchronisable::registerVariable( std::string& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional);
-  template <> _NetworkExport void Synchronisable::registerVariable( const ColourValue& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional);
-  template <> _NetworkExport void Synchronisable::registerVariable( ColourValue& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional);
-  template <> _NetworkExport void Synchronisable::registerVariable( const Vector2& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional);
-  template <> _NetworkExport void Synchronisable::registerVariable( Vector2& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional);
-  template <> _NetworkExport void Synchronisable::registerVariable( const Vector3& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional);
-  template <> _NetworkExport void Synchronisable::registerVariable( Vector3& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional);
-  template <> _NetworkExport void Synchronisable::registerVariable( const Vector4& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional);
-  template <> _NetworkExport void Synchronisable::registerVariable( Vector4& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional);
-  template <> _NetworkExport void Synchronisable::registerVariable( mbool& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional);
-  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 <class T> void Synchronisable::registerVariable(T& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional)
   {
@@ -196,4 +181,6 @@
     }
   }
+  
+  template <> void Synchronisable::registerVariable( std::string& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional);
 
   
Index: code/branches/presentation2/src/libraries/network/synchronisable/SynchronisableSpecialisations.cc
===================================================================
--- code/branches/presentation2/src/libraries/network/synchronisable/SynchronisableSpecialisations.cc	(revision 6190)
+++ 	(revision )
@@ -1,111 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Dumeni Manatschal, (C) 2007
- *      Oliver Scheuss, (C) 2007
- *   Co-authors:
- *      ...
- *
- */
-
-#include <string>
-#include "util/Math.h"
-#include "Synchronisable.h"
-#include "SynchronisableVariable.h"
-
-// ================ template spezialisation
-  
-  
-namespace orxonox{
-  
-  template <> void Synchronisable::registerVariable( std::string& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional)
-  {
-    SynchronisableVariableBase* sv;
-    if (bidirectional)
-      sv = new SynchronisableVariableBidirectional<const std::string>(variable, mode, cb);
-    else
-      sv = new SynchronisableVariable<const std::string>(variable, mode, cb);
-    syncList.push_back(sv);
-    stringList.push_back(sv);
-  }
-  
-  template <> void Synchronisable::registerVariable( const ColourValue& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional)
-  {
-    registerVariable(variable.r, mode, cb, bidirectional);
-    registerVariable(variable.g, mode, cb, bidirectional);
-    registerVariable(variable.b, mode, cb, bidirectional);
-    registerVariable(variable.a, mode, cb, bidirectional);
-  }
-  template <> void Synchronisable::registerVariable( ColourValue& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional)
-  {
-    return Synchronisable::registerVariable( (const ColourValue&)variable, mode, cb, bidirectional);
-  }
-
-  template <> void Synchronisable::registerVariable( const Vector2& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional)
-  {
-    registerVariable(variable.x, mode, cb, bidirectional);
-    registerVariable(variable.y, mode, cb, bidirectional);
-  }
-  
-  template <> void Synchronisable::registerVariable( const Vector3& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional)
-  {
-    registerVariable(variable.x, mode, cb, bidirectional);
-    registerVariable(variable.y, mode, cb, bidirectional);
-    registerVariable(variable.z, mode, cb, bidirectional);
-  }
-  template <> void Synchronisable::registerVariable( Vector3& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional)
-  {
-    registerVariable( (const Vector3&)variable, mode, cb, bidirectional);
-  }
-
-  template <> void Synchronisable::registerVariable( const Vector4& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional)
-  {
-    registerVariable(variable.x, mode, cb, bidirectional);
-    registerVariable(variable.y, mode, cb, bidirectional);
-    registerVariable(variable.z, mode, cb, bidirectional);
-    registerVariable(variable.w, mode, cb, bidirectional);
-  }
-  template <> void Synchronisable::registerVariable( Vector4& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional)
-  {
-    registerVariable( (const Vector4&)variable, mode, cb, bidirectional);
-  }
-  
-  template <> void Synchronisable::registerVariable( mbool& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional)
-  {
-    registerVariable(variable.getMemory(), mode, cb, bidirectional);
-  }
-  
-  template <> void Synchronisable::registerVariable( const Quaternion& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional)
-  {
-    registerVariable(variable.x, mode, cb, bidirectional);
-    registerVariable(variable.y, mode, cb, bidirectional);
-    registerVariable(variable.z, mode, cb, bidirectional);
-    registerVariable(variable.w, mode, cb, bidirectional);
-  }
-  template <> void Synchronisable::registerVariable( Quaternion& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional)
-  {
-    registerVariable( (const Quaternion&)variable, mode, cb, bidirectional);
-  }
-
-  
-
-} //namespace
Index: code/branches/presentation2/src/libraries/network/synchronisable/SynchronisableVariable.h
===================================================================
--- code/branches/presentation2/src/libraries/network/synchronisable/SynchronisableVariable.h	(revision 6190)
+++ code/branches/presentation2/src/libraries/network/synchronisable/SynchronisableVariable.h	(revision 6192)
@@ -81,8 +81,7 @@
       virtual inline void* getReference(){ return static_cast<void*>(const_cast<typename Loki::TypeTraits<T>::UnqualifiedType*>(&this->variable_)); }
     protected:
-      
-      T& variable_;
-      uint8_t mode_;
-      NetworkCallbackBase *callback_;
+      T&                       variable_;
+      uint8_t                  mode_;
+      NetworkCallbackBase      *callback_;
   };
   
@@ -116,5 +115,5 @@
   template <class T> SynchronisableVariable<T>::~SynchronisableVariable()
   {
-    if (this->callback_ != 0)
+    if (this->callback_)
     {
       NetworkCallbackManager::deleteCallback(this->callback_); //safe call for deletion
@@ -141,13 +140,15 @@
       return;
   // check whether we need to consider a callback
-    if ( this->callback_ != 0 )
+    if ( this->callback_ )
     {
       callback = forceCallback || !checkEquality( this->variable_, mem );
+    }
+  // now do a callback if neccessary
+    if ( callback )
+    {
+      NetworkCallbackManager::triggerCallback( this->callback_ );
     }
   // write the data
     loadAndIncrease( this->variable_, mem );
-  // now do a callback if neccessary
-    if ( callback )
-      NetworkCallbackManager::triggerCallback( this->callback_ );
   }
 
@@ -215,5 +216,5 @@
             mem += sizeof(varReference_);
             memcpy(static_cast<void*>(const_cast<typename Loki::TypeTraits<T>::UnqualifiedType*>(&this->varBuffer_)), &this->variable_, sizeof(T));
-            if ( this->callback_ != 0 )
+            if ( this->callback_ )
               callback = true;
           }
@@ -234,14 +235,16 @@
           {
             // value changed so remark for callback
-            if ( this->callback_ != 0 )
+            if ( this->callback_ )
               callback = true;
           }
         }
       }
+  // now do a callback if neccessary
+      if ( callback )
+      {
+        NetworkCallbackManager::triggerCallback( this->callback_ );
+      }
   // now write the data
       loadAndIncrease(this->variable_, mem);
-  // now do a callback if neccessary
-      if ( callback )
-        NetworkCallbackManager::triggerCallback( this->callback_ );
     }
 
Index: code/branches/presentation2/src/libraries/util/Serialise.h
===================================================================
--- code/branches/presentation2/src/libraries/util/Serialise.h	(revision 6190)
+++ code/branches/presentation2/src/libraries/util/Serialise.h	(revision 6192)
@@ -37,4 +37,5 @@
 #include <cstring>
 #include "util/Math.h"
+#include "util/mbool.h"
 
 namespace orxonox{
@@ -374,5 +375,5 @@
         double temp;
         memcpy(&temp, mem, sizeof(uint64_t));
-        *(long double*)( &variable ) = static_cast<const long double>(temp);
+        *(long double*)( &variable ) = static_cast<long double>(temp);
         mem += returnSize( variable );
     }
@@ -469,4 +470,167 @@
         return variable==Degree(*r);
     }
+    
+    // =========== Vector2
+
+    template <> inline uint32_t returnSize( const Vector2& variable )
+    {
+        return returnSize( variable.x )+returnSize( variable.y );
+    }
+
+    template <> inline void saveAndIncrease( const Vector2& variable, uint8_t*& mem )
+    {
+        saveAndIncrease( variable.x, mem );
+        saveAndIncrease( variable.y, mem );
+    }
+
+    template <> inline void loadAndIncrease( const Vector2& variable, uint8_t*& mem )
+    {
+        loadAndIncrease( variable.x, mem );
+        loadAndIncrease( variable.y, mem );
+    }
+
+    template <> inline bool checkEquality( const Vector2& variable, uint8_t* mem )
+    {
+        return checkEquality(variable.x, mem) && checkEquality(variable.y, mem+returnSize(variable.x));
+    }
+    
+    // =========== Vector3
+
+    template <> inline uint32_t returnSize( const Vector3& variable )
+    {
+        return returnSize( variable.x )+returnSize( variable.y )+returnSize( variable.z );
+    }
+
+    template <> inline void saveAndIncrease( const Vector3& variable, uint8_t*& mem )
+    {
+        saveAndIncrease( variable.x, mem );
+        saveAndIncrease( variable.y, mem );
+        saveAndIncrease( variable.z, mem );
+    }
+
+    template <> inline void loadAndIncrease( const Vector3& variable, uint8_t*& mem )
+    {
+        loadAndIncrease( variable.x, mem );
+        loadAndIncrease( variable.y, mem );
+        loadAndIncrease( variable.z, mem );
+    }
+
+    template <> inline bool checkEquality( const Vector3& variable, uint8_t* mem )
+    {
+        return checkEquality(variable.x, mem) && checkEquality(variable.y, mem+returnSize(variable.x)) &&
+            checkEquality(variable.z, mem+returnSize(variable.x)+returnSize(variable.y));
+    }
+    
+    // =========== Vector4
+
+    template <> inline uint32_t returnSize( const Vector4& variable )
+    {
+        return returnSize( variable.w )+returnSize( variable.x )+returnSize( variable.y )+returnSize( variable.z );
+    }
+
+    template <> inline void saveAndIncrease( const Vector4& variable, uint8_t*& mem )
+    {
+        saveAndIncrease( variable.w, mem );
+        saveAndIncrease( variable.x, mem );
+        saveAndIncrease( variable.y, mem );
+        saveAndIncrease( variable.z, mem );
+    }
+
+    template <> inline void loadAndIncrease( const Vector4& variable, uint8_t*& mem )
+    {
+        loadAndIncrease( variable.w, mem );
+        loadAndIncrease( variable.x, mem );
+        loadAndIncrease( variable.y, mem );
+        loadAndIncrease( variable.z, mem );
+    }
+
+    template <> inline bool checkEquality( const Vector4& variable, uint8_t* mem )
+    {
+        return checkEquality(variable.w, mem) && checkEquality(variable.x, mem+returnSize(variable.w)) &&
+            checkEquality(variable.y, mem+returnSize(variable.w)+returnSize(variable.x)) &&
+            checkEquality(variable.y, mem+returnSize(variable.w)+returnSize(variable.x)+returnSize(variable.y));
+    }
+    
+    // =========== Quaternion
+
+    template <> inline uint32_t returnSize( const Quaternion& variable )
+    {
+        return returnSize( variable.w )+returnSize( variable.x )+returnSize( variable.y )+returnSize( variable.z );
+    }
+
+    template <> inline void saveAndIncrease( const Quaternion& variable, uint8_t*& mem )
+    {
+        saveAndIncrease( variable.w, mem );
+        saveAndIncrease( variable.x, mem );
+        saveAndIncrease( variable.y, mem );
+        saveAndIncrease( variable.z, mem );
+    }
+
+    template <> inline void loadAndIncrease( const Quaternion& variable, uint8_t*& mem )
+    {
+        loadAndIncrease( variable.w, mem );
+        loadAndIncrease( variable.x, mem );
+        loadAndIncrease( variable.y, mem );
+        loadAndIncrease( variable.z, mem );
+    }
+
+    template <> inline bool checkEquality( const Quaternion& variable, uint8_t* mem )
+    {
+        return checkEquality(variable.w, mem) && checkEquality(variable.x, mem+returnSize(variable.w)) &&
+            checkEquality(variable.y, mem+returnSize(variable.w)+returnSize(variable.x)) &&
+            checkEquality(variable.y, mem+returnSize(variable.w)+returnSize(variable.x)+returnSize(variable.y));
+    }
+    
+    // =========== ColourValue
+
+    template <> inline uint32_t returnSize( const ColourValue& variable )
+    {
+        return returnSize( variable.r )+returnSize( variable.g )+returnSize( variable.b )+returnSize( variable.a );
+    }
+
+    template <> inline void saveAndIncrease( const ColourValue& variable, uint8_t*& mem )
+    {
+        saveAndIncrease( variable.r, mem );
+        saveAndIncrease( variable.g, mem );
+        saveAndIncrease( variable.b, mem );
+        saveAndIncrease( variable.a, mem );
+    }
+
+    template <> inline void loadAndIncrease( const ColourValue& variable, uint8_t*& mem )
+    {
+        loadAndIncrease( variable.r, mem );
+        loadAndIncrease( variable.g, mem );
+        loadAndIncrease( variable.b, mem );
+        loadAndIncrease( variable.a, mem );
+    }
+
+    template <> inline bool checkEquality( const ColourValue& variable, uint8_t* mem )
+    {
+        return checkEquality(variable.r, mem) && checkEquality(variable.g, mem+returnSize(variable.r)) &&
+            checkEquality(variable.b, mem+returnSize(variable.r)+returnSize(variable.g)) &&
+            checkEquality(variable.a, mem+returnSize(variable.r)+returnSize(variable.g)+returnSize(variable.b));
+    }
+    
+    // =========== mbool
+
+    template <> inline uint32_t returnSize( const mbool& variable )
+    {
+        return returnSize( (unsigned char&)((mbool&)variable).getMemory() ); 
+    }
+
+    template <> inline void saveAndIncrease( const mbool& variable, uint8_t*& mem )
+    {
+        saveAndIncrease( (unsigned char&)((mbool&)variable).getMemory(), mem );
+    }
+
+    template <> inline void loadAndIncrease( const mbool& variable, uint8_t*& mem )
+    {
+        loadAndIncrease( (unsigned char&)((mbool&)variable).getMemory(), mem );
+    }
+
+    template <> inline bool checkEquality( const mbool& variable, uint8_t* mem )
+    {
+        return checkEquality( (unsigned char&)((mbool&)variable).getMemory(), mem );
+    }
 }
 
