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
+32 -4
View File
@@ -49,7 +49,7 @@ const LABELS := {
"pvp_mode": "PK 模式", "block": "屏蔽", "chat": "聊天显示",
"always_show_name": "总显示名字", "effect_on_off": "伤害数字", "salestext_on_off": "叫卖文字",
"name_color_normal": "普通", "name_color_empire": "阵营",
"target_board_no_view": "不看他国", "target_board_view": "看他国",
"target_board_no_view": "", "target_board_view": "",
"pvp_peace": "和平", "pvp_revenge": "反击", "pvp_guild": "帮会", "pvp_free": "自由",
"block_exchange_button": "交易", "block_party_button": "组队", "block_guild_button": "帮会",
"block_whisper_button": "密语", "block_friend_button": "好友", "block_party_request_button": "组队申请",
@@ -99,6 +99,11 @@ func setup(ui_manager: CanvasLayer, m2client: Node, assets := "") -> void:
_block_mode = int(_cfg.get_value("gameopt", "block_mode", 0))
if client and client.has_signal("block_mode_changed"):
client.block_mode_changed.connect(_on_server_block_mode)
if ui and ui.has_signal("window_closed"):
ui.window_closed.connect(func(w):
if not _win.is_empty() and _win.get("root") == w:
_win = {}
)
func is_open() -> bool:
if _mobile_mode:
@@ -127,9 +132,10 @@ func close() -> void:
ui.close(_mobile_root)
_mobile_root = null
return
if is_open():
ui.close(_win["root"])
var r: Control = _win.get("root", null)
_win = {}
if r and is_instance_valid(r) and ui:
ui.close(r)
func open() -> void:
if _mobile_mode:
@@ -141,13 +147,35 @@ func open() -> void:
if not FileAccess.file_exists(path):
push_warning("GameOptionUI: no gameoptiondialog.py at " + path)
return
_win = ui.open_script(path, assets_root)
_win = ui.open_script(path, assets_root, false, true)
if not is_open():
return
set_center_position()
_relabel()
_wire()
_sync()
## 1:1 对齐 40250 uigameoption.py: self.SetCenterPosition()
func set_center_position(offset := Vector2.ZERO) -> void:
var r: Control = _win.get("root", null)
if r == null or not is_instance_valid(r):
return
if ui and ui.has_method("center_window"):
ui.center_window(r, offset)
else:
var vp_sz := Vector2(1920, 1080)
var vp := r.get_viewport()
if vp:
var vrect := vp.get_visible_rect().size
if vrect.x > 300 and vrect.y > 300:
vp_sz = vrect
elif ui and "screen" in ui and ui.screen.x > 0:
vp_sz = Vector2(ui.screen)
var sz := r.size
if sz.x <= 0 or sz.y <= 0:
sz = r.custom_minimum_size
r.position = ((vp_sz - sz) / 2.0 + offset).round()
func _open_mobile() -> void:
if is_open():
return