Index: code/branches/FICN/src/orxonox/objects/SceneNode.cc
===================================================================
--- code/branches/FICN/src/orxonox/objects/SceneNode.cc	(revision 598)
+++ code/branches/FICN/src/orxonox/objects/SceneNode.cc	(revision 599)
@@ -25,62 +25,77 @@
     void SceneNode::loadParams(TiXmlElement* xmlElem)
     {
-    	Ogre::SceneManager* mgr = orxonox::Orxonox::getSingleton()->getSceneManager();
-
     	if (xmlElem->Attribute("name") && xmlElem->Attribute("pos"))
     	{
-    		std::string name = xmlElem->Attribute("name");
+    		name_ = xmlElem->Attribute("name");
 
 	    	std::vector<std::string> pos = tokenize(xmlElem->Attribute("pos"),",");
-	    	float x, y, z;
-    	 	String2Number<float>(x, pos[0]);
-	    	String2Number<float>(y, pos[1]);
-	    	String2Number<float>(z, pos[2]);
+	    	//float x, y, z_;
+    	 	String2Number<float>(x_, pos[0]);
+	    	String2Number<float>(y_, pos[1]);
+	    	String2Number<float>(z_, pos[2]);
 
-        float sx = 1, sy = 1, sz = 1;
+        sx_ = 1; sy_ = 1; sz_ = 1;
         if (xmlElem->Attribute("scale"))
         {
 	    	  pos = tokenize(xmlElem->Attribute("scale"),",");
-    	 	  String2Number<float>(sx, pos[0]);
-	    	  String2Number<float>(sy, pos[1]);
-	    	  String2Number<float>(sz, pos[2]);
+    	 	  String2Number<float>(sx_, pos[0]);
+	    	  String2Number<float>(sy_, pos[1]);
+	    	  String2Number<float>(sz_, pos[2]);
+        }
+        yaw_ = 0.0;
+        if (xmlElem->Attribute("yaw"))
+        {
+          String2Number<float>(yaw_,xmlElem->Attribute("yaw"));
+        }
+        pitch_ = 0.0;
+        if (xmlElem->Attribute("pitch"))
+        {
+          String2Number<float>(pitch_,xmlElem->Attribute("pitch"));
+        }
+        roll_ = 0.0;
+        if (xmlElem->Attribute("roll"))
+        {
+          String2Number<float>(roll_,xmlElem->Attribute("roll"));
         }
 
-        float yaw = 0.0;
-        if (xmlElem->Attribute("yaw"))
-        {
-          String2Number<float>(yaw,xmlElem->Attribute("yaw"));
-        }
-        float pitch = 0.0;
-        if (xmlElem->Attribute("pitch"))
-        {
-          String2Number<float>(pitch,xmlElem->Attribute("pitch"));
-        }
-        float roll = 0.0;
-        if (xmlElem->Attribute("roll"))
-        {
-          String2Number<float>(roll,xmlElem->Attribute("roll"));
-        }
+        if(xmlElem->Attribute("node"))
+          nodeName_ = xmlElem->Attribute("node");
+        else
+          nodeName_ = "";
+        
+        create();
 
-        Ogre::SceneNode *parentNode;
-        if (xmlElem->Attribute("node"))
-          parentNode = mgr->getSceneNode(xmlElem->Attribute("node"));
-        else
-          parentNode = mgr->getRootSceneNode();
-
-        Ogre::SceneNode* node = parentNode->createChildSceneNode(name, Vector3(x,y,z));
-        node->scale(sx,sy,sz);
-        node->yaw(Ogre::Degree(yaw));
-        node->pitch(Ogre::Degree(pitch));
-        node->roll(Ogre::Degree(roll));
-
-	    	COUT(4) << "Loader: Created node "<< name <<" : "<<x<<" " << y << " " << z  << std::endl << std::endl;
+        COUT(4) << "Loader: loaded node "<< name_ <<" : "<< x_ <<" " << y_ << " " << z_ << std::endl << std::endl;
     	}
    }
    
    void SceneNode::registerAllVariables(){
-     
+     registerVar(&x_, sizeof(float), network::DATA);
+     registerVar(&y_, sizeof(float), network::DATA);
+     registerVar(&z_, sizeof(float), network::DATA);
+     registerVar(&sx_, sizeof(float), network::DATA);
+     registerVar(&sy_, sizeof(float), network::DATA);
+     registerVar(&sz_, sizeof(float), network::DATA);
+     registerVar(&yaw_, sizeof(float), network::DATA);
+     registerVar(&pitch_, sizeof(float), network::DATA);
+     registerVar(&roll_, sizeof(float), network::DATA);
+     registerVar(&name_, sizeof(float), network::STRING);
+     registerVar(&nodeName_, sizeof(float), network::STRING);
    }
    
    bool SceneNode::create(){
+     Ogre::SceneManager* mgr = orxonox::Orxonox::getSingleton()->getSceneManager();
+
+     Ogre::SceneNode *parentNode;
+     if (nodeName_.compare("")!=0)
+       parentNode = mgr->getSceneNode(nodeName_);
+     else
+       parentNode = mgr->getRootSceneNode();
+
+     Ogre::SceneNode* node = parentNode->createChildSceneNode(name_, Vector3(x_,y_,z_));
+     node->scale(sx_,sy_,sz_);
+     node->yaw(Ogre::Degree(yaw_));
+     node->pitch(Ogre::Degree(pitch_));
+     node->roll(Ogre::Degree(roll_));
      return true;
    }
Index: code/branches/FICN/src/orxonox/objects/SceneNode.h
===================================================================
--- code/branches/FICN/src/orxonox/objects/SceneNode.h	(revision 598)
+++ code/branches/FICN/src/orxonox/objects/SceneNode.h	(revision 599)
@@ -23,5 +23,6 @@
           float sx_, sy_, sz_;
           float yaw_, pitch_, roll_;
-          std::string node_;
+          std::string name_;
+          std::string nodeName_;
 
     };
Index: code/branches/FICN/src/orxonox/orxonox.cc
===================================================================
--- code/branches/FICN/src/orxonox/orxonox.cc	(revision 598)
+++ code/branches/FICN/src/orxonox/orxonox.cc	(revision 599)
@@ -226,11 +226,12 @@
     //TODO: give config file to Ogre
     std::string mode;
-    if(argc>=2)
-      mode = std::string(argv[1]);
-    else
-      mode = "";
+//     if(argc>=2)
+//       mode = std::string(argv[1]);
+//     else
+//       mode = "";
     ArgReader ar = ArgReader(argc, argv);
     ar.checkArgument("mode", mode, false);
     ar.checkArgument("data", this->dataPath_, false);
+    ar.checkArgument("ip", serverIp_, false);
     if(ar.errorHandling()) die();
 
@@ -238,19 +239,19 @@
     {
       serverInit(path);
-      mode = SERVER;
+      mode_ = SERVER;
     }
     else if(mode == std::string("client"))
     {
       clientInit(path);
-      mode = CLIENT;
+      mode_ = CLIENT;
     }
     else if(mode == std::string("presentation"))
     {
       serverInit(path);
-      mode = PRESENTATION;
+      mode_ = PRESENTATION;
     }
     else{
       standaloneInit(path);
-      mode = STANDALONE;
+      mode_ = STANDALONE;
     }
   }
@@ -267,4 +268,8 @@
     setupScene();
     setupInputSystem();
+    if(mode_!=CLIENT){ // remove this in future ---- presentation hack
+    }
+    else
+      std::cout << "client here" << std::endl;
     createFrameListener();
     Factory::createClassHierarchy();
@@ -273,6 +278,8 @@
       server_g->open();
       break;
+    case CLIENT:
+      client_g->establishConnection();
+      break;
     case SERVER:
-    case CLIENT:
     case STANDALONE:
     default:
@@ -356,4 +363,5 @@
   void Orxonox::serverInit(std::string path)
   {
+    COUT(2) << "initialising server" << std::endl;
     ogre_->setConfigPath(path);
     ogre_->setup();
@@ -366,7 +374,11 @@
   void Orxonox::clientInit(std::string path)
   {
+    COUT(2) << "initialising client" << std::endl;
     ogre_->setConfigPath(path);
     ogre_->setup();
-    client_g = new network::Client(); // address here
+    if(serverIp_.compare("")==0)
+      client_g = new network::Client();
+    else
+      client_g = new network::Client(serverIp_, 55556);
     if(!ogre_->load()) die(/* unable to load */);
     ogre_->getRoot()->addFrameListener(new network::ClientFrameListener());
@@ -523,5 +535,6 @@
     ogre_->getRoot()->addFrameListener(TimerFL);
 
-    frameListener_ = new OrxListener(keyboard_, mouse_, auMan_, steering_);
+    //if(mode_!=CLIENT) // just a hack ------- remove this in future
+      frameListener_ = new OrxListener(keyboard_, mouse_, auMan_, steering_);
     ogre_->getRoot()->addFrameListener(frameListener_);
   }
@@ -536,8 +549,9 @@
     ogre_->getRoot()->getAutoCreatedWindow()->getMetrics(width, height, depth, left, top);
 
-    const OIS::MouseState &ms = mouse_->getMouseState();
-    ms.width = width;
-    ms.height = height;
-
+    if(mode_!=CLIENT){
+      const OIS::MouseState &ms = mouse_->getMouseState();
+      ms.width = width;
+      ms.height = height;
+    }
     ogre_->getRoot()->startRendering();
   }
Index: code/branches/FICN/src/orxonox/orxonox.h
===================================================================
--- code/branches/FICN/src/orxonox/orxonox.h	(revision 598)
+++ code/branches/FICN/src/orxonox/orxonox.h	(revision 599)
@@ -79,4 +79,5 @@
       // this is used to identify the mode (server/client/...) we're in
       gameMode              mode_;
+      std::string           serverIp_;
   };
 }
