浏览代码

newObjects by creation order in fullSync

ncannasse 9 年之前
父节点
当前提交
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;
 	}