Index: /code/branches/FICN/CMakeLists.txt
===================================================================
--- /code/branches/FICN/CMakeLists.txt	(revision 564)
+++ /code/branches/FICN/CMakeLists.txt	(revision 565)
@@ -46,6 +46,8 @@
 
 # pipe $FLAGS to the compiler, and add some local flags. force -O2!
+#SET(CMAKE_C_FLAGS "$ENV{CFLAGS} -O2 -Wall -g -ggdb")
 SET(CMAKE_C_FLAGS "$ENV{CFLAGS} -O2 -Wall -g -ggdb")
-SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -O2 -Wall -g -ggdb")
+#SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -O2 -Wall -g -ggdb")
+SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -Wall -g -ggdb")
 SET(CMAKE_LD_FLAGS "$ENV{LDFLAGS}")
 
Index: /code/branches/FICN/bin/levels/sample.oxw
===================================================================
--- /code/branches/FICN/bin/levels/sample.oxw	(revision 564)
+++ /code/branches/FICN/bin/levels/sample.oxw	(revision 565)
@@ -26,5 +26,5 @@
 		<Skybox src="Orxonox/BlueStarSkyBox" />
 
-		<Entity name="ASSF" src="assf2.mesh" node="OgreHeadNode" />
+		<BaseEntity name="ASSF" src="assf2.mesh" node="OgreHeadNode" />
 
 		<SceneNode name="Ogre1" pos="0,200,0" />
Index: /code/branches/FICN/src/network/Client.cc
===================================================================
--- /code/branches/FICN/src/network/Client.cc	(revision 564)
+++ /code/branches/FICN/src/network/Client.cc	(revision 565)
@@ -127,5 +127,5 @@
     if(!isConnected)
       return false;
-    if(client_connection.addPacket(pck_gen.chatMessage( message.c_str() )));
+    if(client_connection.addPacket(pck_gen.chatMessage( message.c_str() )))
       return client_connection.sendPackets();
     // send packets
Index: /code/branches/FICN/src/network/Synchronisable.cc
===================================================================
--- /code/branches/FICN/src/network/Synchronisable.cc	(revision 564)
+++ /code/branches/FICN/src/network/Synchronisable.cc	(revision 565)
@@ -26,5 +26,5 @@
   datasize=0;
   objectID=idCounter++;
-  //registerAllVariables();
+//   registerAllVariables();
 }
 
@@ -41,7 +41,7 @@
  * @param size size of the datatype the variable consists of
  */
-void Synchronisable::registerVar(const void *var, int size){
+void Synchronisable::registerVar(const void *var, int size, variableType t){
   // create temporary synch.Var struct
-  synchronisableVariable temp={size, var};
+  synchronisableVariable temp={size, var, t};
   // increase datasize
   datasize+=sizeof(int)+size;
@@ -65,5 +65,8 @@
   for(i=syncList.begin(); i!=syncList.end(); i++){
     // increase size (size of variable and size of size of variable ;)
-    totalsize+=sizeof(int)+i->size;
+    if(i->type == STRING)
+      totalsize+=sizeof(int)+((std::string *)i->var)->length()+1;
+    else
+      totalsize+=sizeof(int)+i->size;
   }
   syncData retVal;
@@ -77,10 +80,16 @@
   int n=0;
   for(i=syncList.begin(); n<totalsize && i!=syncList.end(); i++){
-	//CHANGED: i->size TO (const void*)(&(i->size)) memcpy WANTS A CONST VOID* SO CONVERT INT TO CONST VOID*
     std::memcpy(retVal.data+n, (const void*)(i->size), sizeof(int));
     n+=sizeof(int);
-    //CHANGED: i->var TO (const void*)(&(i->var)) SINCE var IS A POINTER, NO & BEFORE i
-    std::memcpy(retVal.data+n, (const void*)(i->var), i->size);
-    n+=i->size;
+    switch(i->type){
+    case STRING:
+      std::memcpy(retVal.data+n, (const void *)(((std::string *)i->var)->c_str()), ((std::string *)i->var)->length()+1);
+      n+=((std::string *)i->var)->length()+1;
+      break;
+    case DATA:
+      std::memcpy(retVal.data+n, ((const void*)i->var), i->size);
+      n+=i->size;
+      break;
+    }
   }
   return retVal;
@@ -107,10 +116,16 @@
   int n=0;
   for(i=syncList.begin(); n<datasize && i!=syncList.end(); i++){
-        //CHANGED: i->size TO (const void*)(&(i->size)) memcpy WANTS A CONST VOID* SO CONVERT INT TO CONST VOID*
     std::memcpy(retVal.data+n, (const void*)(i->size), sizeof(int));
     n+=sizeof(int);
-    //CHANGED: i->var TO (const void*)(&(i->var)) SINCE var IS A POINTER, NO & BEFORE i
-    std::memcpy(retVal.data+n, (const void*)(i->var), i->size);
-    n+=i->size;
+    switch(i->type){
+      case DATA:
+        std::memcpy(retVal.data+n, (const void*)(i->var), i->size);
+        n+=i->size;
+        break;
+      case STRING:
+        std::memcpy(retVal.data+n, (const void*)(((std::string *)i->var)->c_str()), ((std::string *)i->var)->length()+1);
+        n+=((std::string *) i->var)->length()+1;
+        break;
+    }
   }
   return retVal;
@@ -126,9 +141,18 @@
   std::list<synchronisableVariable>::iterator i;
   for(i=syncList.begin(); i!=syncList.end(); i++){
-    if((int)*data==i->size){
-      data+=sizeof(int);
-      //CHANGED: THIS FROM i->var TO (void*)i->var SINCE var IS A CONST VOID* AND memcpy NEEDS A VOID* AS FIRST ARGUMENT
-      memcpy((void*)i->var, data, i->size);
-      data+=i->size;
+    if((int)*data==i->size || i->type==STRING){
+      switch(i->type){
+      case DATA:
+        data+=sizeof(int);
+        memcpy((void*)i->var, data, i->size);
+        data+=i->size;
+        break;
+      case STRING:
+        i->size = (int)*data;
+        data+=sizeof(int);
+        *((std::string *)i->var) = std::string((const char*)data);
+        data += i->size;
+        break;
+      }
     } else
       return false; //there was some problem with registerVar
@@ -142,5 +166,17 @@
  */
 int Synchronisable::getSize(){
-  return datasize;
+  int tsize=0;
+  std::list<synchronisableVariable>::iterator i;
+  for(i=syncList.begin(); i!=syncList.end(); i++){
+    switch(i->type){
+    case DATA:
+      tsize+=i->size;
+      break;
+    case STRING:
+      tsize+=((std::string *)i->var)->length()+1;
+      break;
+    }
+  }
+  return tsize;
 }
 
Index: /code/branches/FICN/src/network/Synchronisable.h
===================================================================
--- /code/branches/FICN/src/network/Synchronisable.h	(revision 564)
+++ /code/branches/FICN/src/network/Synchronisable.h	(revision 565)
@@ -15,4 +15,5 @@
 #include <list>
 #include <iostream>
+#include <string>
 
 #include "orxonox/core/CoreIncludes.h"
@@ -21,4 +22,8 @@
 namespace network {
 
+enum variableType{
+  DATA,
+  STRING,
+};
   
 struct syncData{
@@ -32,4 +37,5 @@
   int size;
   const void *var;
+  variableType type;
 }SYNCVAR;
 
@@ -40,7 +46,6 @@
  * @author Oliver Scheuss
 */
-class Synchronisable : public orxonox::OrxonoxClass{
+class Synchronisable : virtual public orxonox::OrxonoxClass{
 public:
-  Synchronisable();
 
   virtual ~Synchronisable();
@@ -48,11 +53,13 @@
   int classID;
     
-  void registerVar(const void *var, int size);
+  void registerVar(const void *var, int size, variableType t);
   syncData getData();
   syncData getData(unsigned char *mem);
   int getSize();
   bool updateData(syncData vars);
-  virtual void registerAllVariables() = 0;
-
+  virtual void registerAllVariables()=0;
+  virtual bool create(){return true;}
+protected:
+  Synchronisable();
 private:
 /*  bool removeObject(Iterator<Synchronisable> it);*/
Index: /code/branches/FICN/src/orxonox/objects/CMakeLists.txt
===================================================================
--- /code/branches/FICN/src/orxonox/objects/CMakeLists.txt	(revision 564)
+++ /code/branches/FICN/src/orxonox/objects/CMakeLists.txt	(revision 565)
@@ -10,4 +10,5 @@
   Skybox.cc
   SceneNode.cc
+  BaseEntity.cc
   Entity.cc
   Camera.cc
Index: /code/branches/FICN/src/orxonox/objects/WorldEntity.cc
===================================================================
--- /code/branches/FICN/src/orxonox/objects/WorldEntity.cc	(revision 564)
+++ /code/branches/FICN/src/orxonox/objects/WorldEntity.cc	(revision 565)
@@ -74,3 +74,8 @@
         }
     }
+    
+    void WorldEntity::registerAllVariables(){
+      
+      
+    }
 }
Index: /code/branches/FICN/src/orxonox/objects/WorldEntity.h
===================================================================
--- /code/branches/FICN/src/orxonox/objects/WorldEntity.h	(revision 564)
+++ /code/branches/FICN/src/orxonox/objects/WorldEntity.h	(revision 565)
@@ -7,110 +7,110 @@
 #include "OgreSceneManager.h"
 #include "OgreSceneNode.h"
+#include "network/Synchronisable.h"
 
 namespace orxonox
 {
-    class WorldEntity : public BaseObject, public Tickable
-    {
-        public:
-            WorldEntity();
-            ~WorldEntity();
+  class WorldEntity : public BaseObject, public Tickable, public network::Synchronisable
+  {
+    public:
+      WorldEntity();
+      ~WorldEntity();
 
-            void tick(float dt);
+      void tick(float dt);
 
-            inline Ogre::SceneNode* getNode()
-                { return this->node_; }
+      inline Ogre::SceneNode* getNode()
+          { return this->node_; }
 
-            inline void setPosition(const Vector3& pos)
-                { this->node_->setPosition(pos); }
-            inline void setPosition(Real x, Real y, Real z)
-                { this->node_->setPosition(x, y, z); }
-            inline const Vector3& getPosition() const
-                { return this->node_->getPosition(); }
+      inline void setPosition(const Vector3& pos)
+          { this->node_->setPosition(pos); }
+      inline void setPosition(Real x, Real y, Real z)
+          { this->node_->setPosition(x, y, z); }
+      inline const Vector3& getPosition() const
+          { return this->node_->getPosition(); }
 
-            inline void translate(const Vector3 &d, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_PARENT)
-                { this->node_->translate(d, relativeTo); }
-            inline void translate(Real x, Real y, Real z, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_PARENT)
-                { this->node_->translate(x, y, z, relativeTo); }
-            inline void translate(const Matrix3 &axes, const Vector3 &move, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_PARENT)
-                { this->node_->translate(axes, move, relativeTo); }
-            inline void translate(const Matrix3 &axes, Real x, Real y, Real z, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_PARENT)
-                { this->node_->translate(axes, x, y, z, relativeTo); }
+      inline void translate(const Vector3 &d, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_PARENT)
+          { this->node_->translate(d, relativeTo); }
+      inline void translate(Real x, Real y, Real z, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_PARENT)
+          { this->node_->translate(x, y, z, relativeTo); }
+      inline void translate(const Matrix3 &axes, const Vector3 &move, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_PARENT)
+          { this->node_->translate(axes, move, relativeTo); }
+      inline void translate(const Matrix3 &axes, Real x, Real y, Real z, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_PARENT)
+          { this->node_->translate(axes, x, y, z, relativeTo); }
 
-            inline void yaw(const Radian &angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
-                { this->node_->yaw(angle, relativeTo); }
-            inline void pitch(const Radian &angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
-                { this->node_->pitch(angle, relativeTo); }
-            inline void roll(const Radian &angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
-                { this->node_->roll(angle, relativeTo); }
-
-            inline void rotate(const Vector3 &axis, const Radian &angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
-                { this->node_->rotate(axis, angle, relativeTo); }
-            inline void setDirection(Real x, Real y, Real z, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
-                { this->node_->setDirection(x, y, z, relativeTo, localDirectionVector); }
-            inline void setDirection(const Vector3 &vec, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
-                { this->node_->setDirection(vec, relativeTo, localDirectionVector); }
-            inline void setOrientation(const Ogre::Quaternion quat)
-                { this->node_->setOrientation(quat); }
-            inline void lookAt(const Vector3 &targetPoint, Ogre::Node::TransformSpace relativeTo, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
-                { this->node_->lookAt(targetPoint, relativeTo, localDirectionVector); }
-
-            inline void attachObject(Ogre::MovableObject *obj)
-                { this->node_->attachObject(obj); }
-            inline void detachObject(Ogre::MovableObject *obj)
-                { this->node_->detachObject(obj); }
-            inline void detachAllObjects()
-                { this->node_->detachAllObjects(); }
-
-            inline void setVelocity(const Vector3& velocity)
-                { this->velocity_ = velocity; }
-            inline void setVelocity(Real x, Real y, Real z)
-                { this->velocity_.x = x; this->velocity_.y = y; this->velocity_.z = z; }
-            inline const Vector3& getVelocity() const
-                { return this->velocity_; }
-
-            inline void setAcceleration(const Vector3& acceleration)
-                { this->acceleration_ = acceleration; }
-            inline void setAcceleration(Real x, Real y, Real z)
-                { this->acceleration_.x = x; this->acceleration_.y = y; this->acceleration_.z = z; }
-            inline const Vector3& getAcceleration() const
-                { return this->acceleration_; }
-
-            inline void setRotationAxis(const Vector3& axis)
-                { this->rotationAxis_ = axis; }
-            inline void setRotationAxis(Real x, Real y, Real z)
-                { this->rotationAxis_.x = x; this->rotationAxis_.y = y; this->rotationAxis_.z = z; }
-            inline const Vector3& getRotationAxis() const
-                { return this->rotationAxis_; }
-
-            inline void setRotationRate(const Radian& angle)
-                { this->rotationRate_ = angle; }
-            inline void setRotationRate(const Degree& angle)
-                { this->rotationRate_ = angle; }
-            inline const Radian& getRotationRate() const
-                { return this->rotationRate_; }
-
-            inline void setMomentum(const Radian& angle)
-                { this->momentum_ = angle; }
-            inline void setMomentum(const Degree& angle)
-                { this->momentum_ = angle; }
-            inline const Radian& getMomentum() const
-                { return this->momentum_; }
+      inline void yaw(const Radian &angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
+          { this->node_->yaw(angle, relativeTo); }
+      inline void pitch(const Radian &angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
+          { this->node_->pitch(angle, relativeTo); }
+      inline void roll(const Radian &angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
+          { this->node_->roll(angle, relativeTo); }
 
 
-            inline const Ogre::Quaternion& getOrientation()
-                { return this->node_->getOrientation(); }
+      inline void rotate(const Vector3 &axis, const Radian &angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
+          { this->node_->rotate(axis, angle, relativeTo); }
+      inline void setDirection(Real x, Real y, Real z, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
+          { this->node_->setDirection(x, y, z, relativeTo, localDirectionVector); }
+      inline void setDirection(const Vector3 &vec, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
+          { this->node_->setDirection(vec, relativeTo, localDirectionVector); }
+      inline void setOrientation(const Ogre::Quaternion quat)
+          { this->node_->setOrientation(quat); }
+      inline void lookAt(const Vector3 &targetPoint, Ogre::Node::TransformSpace relativeTo, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
+          { this->node_->lookAt(targetPoint, relativeTo, localDirectionVector); }
 
+      inline void attachObject(Ogre::MovableObject *obj)
+          { this->node_->attachObject(obj); }
+      inline void detachObject(Ogre::MovableObject *obj)
+          { this->node_->detachObject(obj); }
+      inline void detachAllObjects()
+          { this->node_->detachAllObjects(); }
 
-        private:
-            Ogre::SceneNode* node_;
-            static unsigned int worldEntityCounter_s;
+      inline void setVelocity(const Vector3& velocity)
+          { this->velocity_ = velocity; }
+      inline void setVelocity(Real x, Real y, Real z)
+          { this->velocity_.x = x; this->velocity_.y = y; this->velocity_.z = z; }
+      inline const Vector3& getVelocity() const
+          { return this->velocity_; }
 
-            bool bStatic_;
-            Vector3 velocity_;
-            Vector3 acceleration_;
-            Vector3 rotationAxis_;
-            Radian rotationRate_;
-            Radian momentum_;
-    };
+      inline void setAcceleration(const Vector3& acceleration)
+          { this->acceleration_ = acceleration; }
+      inline void setAcceleration(Real x, Real y, Real z)
+          { this->acceleration_.x = x; this->acceleration_.y = y; this->acceleration_.z = z; }
+      inline const Vector3& getAcceleration() const
+          { return this->acceleration_; }
+
+      inline void setRotationAxis(const Vector3& axis)
+          { this->rotationAxis_ = axis; }
+      inline void setRotationAxis(Real x, Real y, Real z)
+          { this->rotationAxis_.x = x; this->rotationAxis_.y = y; this->rotationAxis_.z = z; }
+      inline const Vector3& getRotationAxis() const
+          { return this->rotationAxis_; }
+
+      inline void setRotationRate(const Radian& angle)
+          { this->rotationRate_ = angle; }
+      inline void setRotationRate(const Degree& angle)
+          { this->rotationRate_ = angle; }
+      inline const Radian& getRotationRate() const
+          { return this->rotationRate_; }
+
+      inline void setMomentum(const Radian& angle)
+          { this->momentum_ = angle; }
+      inline void setMomentum(const Degree& angle)
+          { this->momentum_ = angle; }
+      inline const Radian& getMomentum() const
+          { return this->momentum_; }
+      inline const Ogre::Quaternion& getOrientation()
+          { return this->node_->getOrientation(); }
+      
+    private:
+      void registerAllVariables();
+      Ogre::SceneNode* node_;
+      static unsigned int worldEntityCounter_s;
+
+      bool bStatic_;
+      Vector3 velocity_;
+      Vector3 acceleration_;
+      Vector3 rotationAxis_;
+      Radian rotationRate_;
+      Radian momentum_;
+  };
 }
 
Index: /code/branches/FICN/src/orxonox/orxonox.cc
===================================================================
--- /code/branches/FICN/src/orxonox/orxonox.cc	(revision 564)
+++ /code/branches/FICN/src/orxonox/orxonox.cc	(revision 565)
@@ -154,4 +154,5 @@
         //if(mKeyboard->isKeyDown(OIS::KC_ESCAPE))
           //cout << "maximal MouseX: " << maxMouseX << "\tminMouseX: " << minMouseX << endl;
+        usleep(10);
         return !mKeyboard->isKeyDown(OIS::KC_ESCAPE);
       }
