Index: trunk/src/lib/network/converter.cc
===================================================================
--- trunk/src/lib/network/converter.cc	(revision 6695)
+++ trunk/src/lib/network/converter.cc	(revision 6737)
@@ -88,5 +88,5 @@
  * @remarks: The int is stored in big-endian
  * @param x: The int which is to convert
- * @return: A byte-array that accords the given int value
+ * @return: The number of written bytes
  */
 int Converter::intToByteArray(int x, byte* a, int length)
@@ -124,5 +124,6 @@
  * Converts a byte-array into an int
  * @param a: The byte-array which is to convert
- * @return: An int that accords the given byte-array
+ * @param x: The place where the result is stored
+ * @return: The number of read bytes
  */
 int Converter::byteArrayToInt(const byte* a, int* x)
@@ -150,4 +151,6 @@
 /*!
  * Converts a float into a string containing its binary representation
+ * @param x: The float which is to convert
+ * @return: A string containing the float's binary representation
  */
 char* Converter::floatToBinString(float x)
@@ -331,7 +334,9 @@
  * Converts a float value into a byte-array and stores the result into a given byte-array
  * @param x: The float which is to convert
- * @return: A byte-array which accords the given float
- */
-int Converter::_floatToByteArray(float x, byte* a, int length)
+ * @param a: The byte array where the result is to store
+ * @param length: The length of the array a
+ * @return: The number of written bytes
+ */
+int Converter::floatToByteArray(float x, byte* a, int length)
 {
   if (length < FLOATSIZE)
@@ -398,6 +403,6 @@
 
 
-    if (mantisse != 0)
-    {
+    //if (mantisse != 0)
+    //{
       while (mantisse < expmult)
       {
@@ -406,6 +411,17 @@
       }
 
-      mantisse -= expmult;
-    }
+      if (exponent >= 0)
+        mantisse -= expmult;
+      else
+      {
+        //Denormalized
+        while (exponent < 0)
+        {
+          mantisse /= 2;
+          exponent++;
+        }
+        printf("Conv: Denorm");
+      }
+    //}
   }
 
@@ -414,5 +430,6 @@
 
   int hx = mantisse + expmult * exponent;
-  int result = intToByteArray(hx, a, length);
+  //int result = intToByteArray(hx, a, length);
+  intToByteArray(hx, a, length);
   if (sgn == -1)
     a[3] += sgnadd;
@@ -424,5 +441,6 @@
 //    result[3] += sgnadd;
 
-  return result;
+  //return result;
+  return FLOATSIZE;
 }
 
@@ -431,7 +449,8 @@
  * Converts a byte-array into a float value
  * @param a: The byte-array which is to convert
- * @return: A float value which accords the given byte-array
- */
-int Converter::_byteArrayToFloat(const byte* a, float* x)
+ * @param x: The place where the result is to store
+ * @return: The number of read bytes
+ */
+int Converter::byteArrayToFloat(const byte* a, float* x)
 {
     //handle 0
@@ -459,8 +478,14 @@
     return FLOATSIZE;
   }
-
-  mantisse += expmult;
-  exponent -= 128;
-
+  else if (exponent == 0 && mantisse != 0)
+  {
+    exponent = -126;
+    printf("ReConv: Denorm");
+  }
+  else
+  {
+    mantisse += expmult;
+    exponent -= 128;
+  }
 
   int sgn;
@@ -498,9 +523,11 @@
  * Converts a float value into a byte-array
  * @param x: The float which is to convert
- * @return: A byte-array which accords the given float
- */
-int Converter::floatToByteArray(float x, byte* a, int length)
-{
-  if ( length<4 )
+ * @param a: The array where the result is to store
+ * @param length: The length of the array a
+ * @return: The number of written bytes
+ */
+int Converter::_floatToByteArray(float x, byte* a, int length)
+{
+  if ( length< FLOATSIZE )
   {
     PRINTF(1)("Byte Array to small\n");
@@ -511,5 +538,6 @@
   for (int i = 0; i < 4; i++)
     a[i] = p[i];
-  return 4;
+  
+  return FLOATSIZE;
 }
 
@@ -518,12 +546,22 @@
  * Converts a byte-array into a float value
  * @param a: The byte-array which is to convert
- * @return: A float value which accords the given byte-array
- */
-int Converter::byteArrayToFloat(const byte* a, float* x)
+ * @param x: The place where the result is to store
+ * @return: The number of read bytes
+ */
+int Converter::_byteArrayToFloat(const byte* a, float* x)
 {
   *x = *((float*)a);
 
-  return 4;
-}
+  return FLOATSIZE;
+}
+
+
+
+
+
+
+
+
+
 
 /**
@@ -627,20 +665,36 @@
 }
 
+void Converter::ArrayfloatTest(float x)
+{
+  //float x = 8.0f;
+  //float x = numeric_limits<float>::infinity();
+
+  printf("To Convert: %e\n", x);
+  byte* res = new byte[4];
+
+  int wr = floatToByteArray(x, res, 4);
+  for (int i = 0; i < 4; i++)
+    printf("%i ", res[i]);
+  printf("  written bytes: %i \n", wr);
+
+  float y;
+  int rd = byteArrayToFloat(res, &y);
+  printf("ReConvert: %e\n", y);
+  printf("Read bytes: %i   ->  ", rd);
+
+  if (x == y)
+    printf("equal\n");
+  else
+    printf("different\n");
+}
+
 void Converter::debug()
 {
   printf("We rulez\n");
 
-  //Denormalized?
-  //floatTest(-9.87624e-38f);
-  //floatTest(-9.87624e-37f);
-  //floatTest(-9.87624e-36f);
-  //floatTest(-9.87624e-35f);
-
-  /*
-  floatTest(14.7f);
-  floatTest(12.07e15f);
-  floatTest(0.0f);
-  floatTest(5.67e-15f);
-  */
+  ArrayfloatTest(0.125f);
+  ArrayfloatTest(64.0f);
+  ArrayfloatTest(0.0f);
+  ArrayfloatTest(5.00091e-29f);
 
   //floatTest(-18.0098f);
@@ -648,7 +702,9 @@
   //floatTest(-0.0f);
   //floatTest(-5.67e-29f);
-  floatTest(-45.7e-32f);
-  floatTest(45.7e-33f);
-  floatTest(-45.7e-34f);
-  floatTest(45.7e-35f);
-}
+  
+  
+  //floatTest(-45.7e-32f);
+  //floatTest(45.7e-33f);
+  //floatTest(-45.7e-34f);
+  //floatTest(45.7e-35f);
+}
Index: trunk/src/lib/network/converter.h
===================================================================
--- trunk/src/lib/network/converter.h	(revision 6695)
+++ trunk/src/lib/network/converter.h	(revision 6737)
@@ -50,4 +50,5 @@
     static void debug();
     static void floatTest(float x);
+    static void ArrayfloatTest(float x);
     static float getDenormConst();
 
Index: trunk/src/lib/network/network_game_manager.cc
===================================================================
--- trunk/src/lib/network/network_game_manager.cc	(revision 6695)
+++ trunk/src/lib/network/network_game_manager.cc	(revision 6737)
@@ -32,4 +32,5 @@
 #include "network_manager.h"
 
+#include "class_list.h"
 
 /* include your own header */
@@ -462,4 +463,23 @@
 
 
+
+bool NetworkGameManager::signalLeftPlayer(int userID)
+{
+  const std::list<BaseObject*>* playableList = ClassList::getList(CL_PLAYABLE);
+  std::list<BaseObject*>::const_iterator it = playableList->begin();
+
+  for(; it != playableList->end(); it++)
+  {
+    if( dynamic_cast<Synchronizeable*>(*it)->getOwner() == userID )
+    {
+      PRINTF(0)("remove playable from %i\n", userID);
+      this->removeEntity(dynamic_cast<Synchronizeable*>(*it)->getUniqueID());
+      return true;
+    }
+  }
+  return false;
+}
+
+
 /**
  * Creates a buffer for user n
@@ -527,5 +547,5 @@
         PNode *p = dynamic_cast<PNode*>(b);
         p->setAbsCoor(pos);
-        //p->updateNode(0);
+        p->updateNode(0);
         pos += Vector(1000.0, 1000.0, 1000.0);
       }
Index: trunk/src/lib/network/network_game_manager.h
===================================================================
--- trunk/src/lib/network/network_game_manager.h	(revision 6695)
+++ trunk/src/lib/network/network_game_manager.h	(revision 6737)
@@ -95,4 +95,7 @@
     void sendEntityList(int userID);
 
+    bool signalNewPlayer(int userId);
+    bool signalLeftPlayer(int userID);
+
 
   private:
@@ -133,6 +136,4 @@
     bool canCreateEntity(ClassID classID);
 
-    bool signalNewPlayer(int userId);
-
     void resizeBufferVector(int n);
 
Index: trunk/src/lib/network/network_stream.cc
===================================================================
--- trunk/src/lib/network/network_stream.cc	(revision 6695)
+++ trunk/src/lib/network/network_stream.cc	(revision 6737)
@@ -390,4 +390,7 @@
       handshakes[i] = NULL;
 
+
+      NetworkGameManager::getInstance()->signalLeftPlayer(i);
+
       if ( i == networkSockets.size()-1 )
       {
