2
0
Эх сурвалжийг харах

newObjects by creation order in fullSync

ncannasse 9 жил өмнө
parent
commit
b4bc1675ec
1 өөрчлөгдсөн 2 нэмэгдсэн , 2 устгасан
  1. 2 2
      hxd/net/Serializer.hx

+ 2 - 2
hxd/net/Serializer.hx

@@ -232,10 +232,10 @@ class Serializer {
 		if( UID < id ) UID = id;
 		var clid = getInt();
 		var i : Serializable = Type.createEmptyInstance(CLASSES[clid]);
+		if( newObjects != null ) newObjects.push(i);
 		i.__uid = id;
 		refs[id] = i;
 		i.unserialize(this);
-		if( newObjects != null ) newObjects.push(i);
 		return i;
 	}
 
@@ -247,10 +247,10 @@ class Serializer {
 		if( UID < id ) UID = id;
 		var clid = CLIDS[clid];
 		var i = Type.createEmptyInstance(clid == 0 ? c : cast CL_BYID[getByte()]);
+		if( newObjects != null ) newObjects.push(i);
 		i.__uid = id;
 		refs[id] = i;
 		i.unserialize(this);
-		if( newObjects != null ) newObjects.push(i);
 		return i;
 	}