完善客户端功能并同步差距文档

This commit is contained in:
shenlei
2026-09-03 18:40:01 +09:00
parent f93a172296
commit 13ccb8d02d
135 changed files with 21881 additions and 1259 deletions
+7 -4
View File
@@ -21,9 +21,10 @@ func _init() -> void:
print(" ", k, " = ", rep[k])
var terr: int = 0
for c in w.get_children():
if String(c.name).begins_with("Terrain_"):
terr += 1
# Terrain_* now lives below Chunk_* roots so unloading can free a whole
# streamed chunk. Count recursively; direct-child counting reports a false 0.
for c in w.find_children("Terrain_*", "MeshInstance3D", true, false):
terr += 1
print("terrain MeshInstance3D children: ", terr)
var h1: float = w.call("sample_height", 128.0, 128.0)
@@ -33,7 +34,9 @@ func _init() -> void:
# 顶视正交截图(W2 与 minimap 对齐用)
_shot(w, rep)
var expect: int = int(rep["map_size_x"]) * int(rep["map_size_y"])
var expected_chunks: int = int(rep["map_size_x"]) * int(rep["map_size_y"])
var patch_side := maxi(1, int(w.get("terrain_patches")))
var expect: int = expected_chunks * patch_side * patch_side
var pass_ok: bool = ok and terr == expect and int(rep["chunks_failed"]) == 0 \
and h1 != 0.0 and h_out == 0.0
print("RESULT: ", "PASS" if pass_ok else "FAIL")