Index: code/branches/network/src/network/Synchronisable.cc
===================================================================
--- code/branches/network/src/network/Synchronisable.cc	(revision 1520)
+++ code/branches/network/src/network/Synchronisable.cc	(revision 1521)
@@ -45,4 +45,5 @@
 
 #include "core/CoreIncludes.h"
+// #include "core/Identifier.h"
 
 namespace network
@@ -66,4 +67,8 @@
 
   Synchronisable::~Synchronisable(){
+    // delete callback function objects
+    if(!orxonox::Identifier::isCreatingHierarchy())
+      for(std::list<synchronisableVariable *>::iterator it = syncList->begin(); it!=syncList->end(); it++)
+        delete (*it)->callback;
   }
   
@@ -87,5 +92,5 @@
   * @param size size of the datatype the variable consists of
   */
-  void Synchronisable::registerVar(void *var, int size, variableType t, int mode){
+  void Synchronisable::registerVar(void *var, int size, variableType t, int mode, NetworkCallbackBase *cb){
     // create temporary synch.Var struct
     synchronisableVariable *temp = new synchronisableVariable;
@@ -94,4 +99,5 @@
     temp->mode = mode; 
     temp->type = t;
+    temp->callback = cb;
     COUT(5) << "Syncronisable::registering var with size: " << temp->size << " and type: " << temp->type << std::endl; 
     // increase datasize
@@ -218,6 +224,10 @@
       }
       COUT(5) << "Synchronisable: element size: " << (*i)->size << " type: " << (*i)->type << std::endl;
+      bool callback=false;
       switch((*i)->type){
       case DATA:
+        if((*i)->callback) // check whether this variable changed (but only if callback was set)
+          if(strncmp((char *)(*i)->var, (char *)data, (*i)->size)!=0)
+            callback=true;
         memcpy((void*)(*i)->var, data, (*i)->size);
         data+=(*i)->size;
@@ -227,4 +237,7 @@
         COUT(5) << "string size: " << (*i)->size << std::endl;
         data+=sizeof(int);
+        if((*i)->callback) // check whether this string changed
+          if( *(std::string *)((*i)->var) != std::string((char *)data) )
+            callback=true;
         *((std::string *)((*i)->var)) = std::string((const char*)data);
         COUT(5) << "synchronisable: char: " << (const char*)data << " string: " << std::string((const char*)data) << std::endl;
@@ -232,4 +245,7 @@
         break;
       }
+      // call the callback function, if defined
+      if(callback)
+        (*i)->callback->call();
     }
     return true;
Index: code/branches/network/src/network/Synchronisable.h
===================================================================
--- code/branches/network/src/network/Synchronisable.h	(revision 1520)
+++ code/branches/network/src/network/Synchronisable.h	(revision 1521)
@@ -27,15 +27,4 @@
  */
 
-//
-// C++ Interface: synchronisable
-//
-// Description:
-//
-//
-// Author:  Oliver Scheuss, (C) 2007
-//
-// Copyright: See COPYING file that comes with this distribution
-//
-//
 #ifndef _Synchronisable_H__
 #define _Synchronisable_H__
@@ -45,4 +34,5 @@
 #include <list>
 #include "core/OrxonoxClass.h"
+#include "NetworkCallback.h"
 
 namespace network
@@ -65,4 +55,5 @@
     void *var;
     variableType type;
+    NetworkCallbackBase *callback;
   }SYNCVAR;
 
@@ -81,5 +72,5 @@
     int classID;
 
-    void registerVar(void *var, int size, variableType t, int mode=1);
+    void registerVar(void *var, int size, variableType t, int mode=1, NetworkCallbackBase *cb=0);
     //  syncData getData();
     syncData getData(unsigned char *mem, int mode=0x0);
Index: code/branches/network/src/orxonox/objects/SpaceShip.cc
===================================================================
--- code/branches/network/src/orxonox/objects/SpaceShip.cc	(revision 1520)
+++ code/branches/network/src/orxonox/objects/SpaceShip.cc	(revision 1521)
@@ -69,4 +69,5 @@
     SpaceShip* SpaceShip::instance_s;
 
+    
     SpaceShip *SpaceShip::getLocalShip(){
       Iterator<SpaceShip> it;
@@ -163,5 +164,5 @@
 
     void SpaceShip::registerAllVariables(){
-      registerVar( &camName_, camName_.length()+1, network::STRING, 0x1);
+      registerVar( &camName_, camName_.length()+1, network::STRING, 0x1 );
       registerVar( &maxSpeed_, sizeof(maxSpeed_), network::DATA, 0x1);
       registerVar( &maxSideAndBackSpeed_, sizeof(maxSideAndBackSpeed_), network::DATA, 0x1);
Index: code/branches/network/src/orxonox/objects/SpaceShip.h
===================================================================
--- code/branches/network/src/orxonox/objects/SpaceShip.h	(revision 1520)
+++ code/branches/network/src/orxonox/objects/SpaceShip.h	(revision 1521)
@@ -44,4 +44,5 @@
     {
         public:
+          
 
             static SpaceShip *getLocalShip();
