feat(client): 完成40250客户端核心功能1:1对齐与桥梁高度采样修复

- 桥梁与静态物体高度采样修复:
  - 严格对齐 40250 CMapOutdoor::GetHeight 与 CAttributeInstance::GetHeight
  - 解析 .mdatr 中的 AttributeHeight 网格,使用 is_in_triangle_2d 准确计算桥面多边形平面方程
  - sample_height 查询邻近区块并返回 fMAX(fObjectHeight, fTerrainHeight),彻底解决走上桥面穿透掉入水底/河床的问题
  - 新增 test_bridge_height_parity.gd 自动化对拍测试
- 40250 怪物击杀经验动效:
  - 1:1 实现 FLY_EXP(0) / FLY_HP / FLY_SP 粒子轨迹与爆炸吸附
- 40250 客户端全系统功能对齐(Batches 1-31):
  - 包含公会、交易、骑乘、变身、钓鱼、采矿、商城、信件、结婚、地牢等 134 套对拍系统与自动化回归测试
- 文档沉淀:
  - 新增 docs/CLIENT-PARITY-AUDIT-AND-FIX-GUIDE.md 客户端对拍缺陷发现与修复工程指南
This commit is contained in:
shen
2026-09-19 08:51:25 -07:00
parent 1db9e9a129
commit 66d217b313
650 changed files with 53046 additions and 1586 deletions
+27 -1
View File
@@ -88,8 +88,11 @@ func _process(_delta: float) -> void:
match _state:
"settle_first":
if _seconds_in_state(now) >= SETTLE_SECONDS:
if _seconds_in_state(now) >= SETTLE_SECONDS and _game_scene_ready():
_run_world_checks()
elif _seconds_in_state(now) >= STEP_TIMEOUT_SECONDS:
_fail("进场后真实角色模型、装备或快捷栏未在时限内建立")
_finish_later()
"wait_move":
if _seconds_in_state(now) >= 1.5:
_send_stop()
@@ -185,6 +188,10 @@ func _run_world_checks() -> void:
_check(_has_method_and_array("get_skills"), "技能接口可读取")
_check(_has_method_and_array("get_quickslots"), "快捷栏接口可读取")
_check(_has_method_and_array("get_affects"), "状态接口可读取")
var scene: Node = _flow.get("_game")
_check(is_instance_valid(scene) and bool(scene.get("_model_built")), "真实角色模型建立")
_check(is_instance_valid(scene) and is_instance_valid(scene.get("equip_model")), "装备渲染控制器建立")
_check(is_instance_valid(scene) and is_instance_valid(scene.get("quickbar")), "技能快捷栏建立")
var p: Variant = main_entity.get("pos_cm", null)
if p is Vector3:
@@ -195,10 +202,29 @@ func _run_world_checks() -> void:
_fail("主角色缺少 pos_cm")
if not _mutations:
_set_state("capture")
await _capture_diagnostic_frame()
_start_reconnect()
return
_send_move()
func _capture_diagnostic_frame() -> void:
var path := OS.get_environment("MT_DIAG_SHOT").strip_edges()
if path.is_empty():
return
await RenderingServer.frame_post_draw
var image := get_viewport().get_texture().get_image()
if image == null or image.save_png(path) != OK:
_fail("无法保存联网渲染诊断截图")
func _game_scene_ready() -> bool:
if _flow == null:
return false
var scene: Node = _flow.get("_game")
return is_instance_valid(scene) and bool(scene.get("_model_built")) \
and is_instance_valid(scene.get("equip_model")) \
and is_instance_valid(scene.get("quickbar"))
func _has_method_and_array(method_name: String) -> bool:
if _client == null or not _client.has_method(method_name):
return false