소스 검색

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;
 	}