Index: code/branches/presentation2/src/libraries/network/synchronisable/CMakeLists.txt
===================================================================
--- code/branches/presentation2/src/libraries/network/synchronisable/CMakeLists.txt	(revision 6132)
+++ 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 6132)
+++ 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 6132)
+++ 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 6132)
+++ 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 6132)
+++ 	(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 6132)
+++ 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_ );
     }
 
