Index: branches/network/src/lib/network/network_stream.cc
===================================================================
--- branches/network/src/lib/network/network_stream.cc	(revision 7613)
+++ branches/network/src/lib/network/network_stream.cc	(revision 7614)
@@ -465,5 +465,4 @@
 
           PRINT(0)("handshake finished id=%d\n", it->second.handshake->getNetworkGameManagerId());
-          assert(false);
 
           delete it->second.handshake;
@@ -474,5 +473,4 @@
           PRINT(1)("handshake failed!\n");
           it->second.socket->disconnectServer();
-          assert(false);
         }
       }
@@ -521,4 +519,8 @@
       
       if ( isServer() && sync.getLeafClassID() == CL_HANDSHAKE && sync.getUniqueID() != peer->second.userId )
+        continue;
+      
+      //do not sync null parent
+      if ( sync.getLeafClassID() == CL_NULL_PARENT )
         continue;
 
@@ -535,9 +537,9 @@
       //make space for size
       offset += INTSIZE;
-      
+
       n = sync.getStateDiff( peer->second.userId, buf + offset, UDP_PACKET_SIZE-offset, currentState, peer->second.lastAckedState, 0 );
       offset += n;
       
-      assert( Converter::intToByteArray( n, buf + offset - n, INTSIZE ) == INTSIZE );
+      assert( Converter::intToByteArray( n, buf + offset - n - INTSIZE, INTSIZE ) == INTSIZE );
     }
     
@@ -545,6 +547,5 @@
     
     assert( peer->second.socket->writePacket( buf, offset ) );
-    PRINTF(0)("send packet: %d userId = %d %x %d\n", offset, peer->second.userId, peer->second.handshake->getLeafClassID(), peer->second.handshake->getUniqueID());
-    assert( peer->second.handshake->getLeafClassID() == CL_HANDSHAKE );
+    PRINTF(0)("send packet: %d userId = %d\n", offset, peer->second.userId);
   }
 }
@@ -568,4 +569,5 @@
   for ( PeerList::iterator peer = peers.begin(); peer != peers.end(); peer++ )
   {
+    
     if ( !peer->second.socket )
       continue;
@@ -598,5 +600,5 @@
       continue;
     }
-    
+
     while ( offset < length )
     {
@@ -666,4 +668,5 @@
         }
       }
+
       offset += sync->setStateDiff( peer->second.userId, buf+offset, length-offset, state, fromState );
     }
@@ -676,9 +679,10 @@
     peer->second.lastAckedState = ackedState;
   }
-}
-
-
-
-
-
-
+  
+}
+
+
+
+
+
+
Index: branches/network/src/lib/network/synchronizeable.cc
===================================================================
--- branches/network/src/lib/network/synchronizeable.cc	(revision 7613)
+++ branches/network/src/lib/network/synchronizeable.cc	(revision 7614)
@@ -285,5 +285,5 @@
   else
     stateFrom = (*it);
-
+  
   std::list<int> changes;
   
@@ -302,5 +302,5 @@
   //add state to state history
   recvStates[userId].push_back( stateTo );
-
+  
   int i = 0;
 
@@ -309,5 +309,5 @@
     i += (*it)->readFromBuf( stateTo->data + i, stateTo->dataLength - i );
   }
-  
+
   this->varChangeHandler( changes );
   
@@ -322,6 +322,4 @@
 void Synchronizeable::varChangeHandler( std::list<int> & id )
 {
-  for ( std::list<int>::iterator it = id.begin(); it != id.end(); it++ )
-    assert( *it != mLeafClassId );
 }
 
Index: branches/network/src/lib/network/synchronizeable_var/synchronizeable_quaternion.cc
===================================================================
--- branches/network/src/lib/network/synchronizeable_var/synchronizeable_quaternion.cc	(revision 7613)
+++ branches/network/src/lib/network/synchronizeable_var/synchronizeable_quaternion.cc	(revision 7614)
@@ -83,17 +83,17 @@
   int n = 0;
 
-  res += Converter::byteArrayToFloat( buf + n, &x );
+  res = Converter::byteArrayToFloat( buf + n, &x );
   assert( res > 0 );
   n += res;
 
-  res += Converter::byteArrayToFloat( buf + n, &y );
+  res = Converter::byteArrayToFloat( buf + n, &y );
   assert( res > 0 );
   n += res;
 
-  res += Converter::byteArrayToFloat( buf + n, &z );
+  res = Converter::byteArrayToFloat( buf + n, &z );
   assert( res > 0 );
   n += res;
 
-  res += Converter::byteArrayToFloat( buf + n, &w );
+  res = Converter::byteArrayToFloat( buf + n, &w );
   assert( res > 0 );
   n += res;
@@ -101,6 +101,6 @@
   *vPtrOut = Quaternion( Vector(x, y, z), w );
 
-  assert( res == 4*FLOATSIZE );
-  return res;
+  assert( n == 4*FLOATSIZE );
+  return n;
 }
 
Index: branches/network/src/lib/network/synchronizeable_var/synchronizeable_vector.cc
===================================================================
--- branches/network/src/lib/network/synchronizeable_var/synchronizeable_vector.cc	(revision 7613)
+++ branches/network/src/lib/network/synchronizeable_var/synchronizeable_vector.cc	(revision 7614)
@@ -80,13 +80,13 @@
   int n = 0;
 
-  res += Converter::byteArrayToFloat( buf + n, &x );
+  res = Converter::byteArrayToFloat( buf + n, &x );
   assert( res > 0 );
   n += res;
 
-  res += Converter::byteArrayToFloat( buf + n, &y );
+  res = Converter::byteArrayToFloat( buf + n, &y );
   assert( res > 0 );
   n += res;
 
-  res += Converter::byteArrayToFloat( buf + n, &z );
+  res = Converter::byteArrayToFloat( buf + n, &z );
   assert( res > 0 );
   n += res;
@@ -94,6 +94,6 @@
   *vPtrOut = Vector( x, y, z );
 
-  assert( res == 3*FLOATSIZE );
-  return res;
+  assert( n == 3*FLOATSIZE );
+  return n;
 }
 
