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:
@@ -5,6 +5,7 @@ extends SceneTree
|
||||
const ItemListDB = preload("res://ui/item_list.gd")
|
||||
const RemotePlayerView = preload("res://ui/remote_player_view.gd")
|
||||
const NetWorld = preload("res://net_world.gd")
|
||||
const EffectRegistry = preload("res://fx/effect_registry.gd")
|
||||
|
||||
class FieldProbe extends Node3D:
|
||||
var calls: Array = []
|
||||
@@ -41,17 +42,47 @@ func _run() -> void:
|
||||
if not il.load_file(assets.path_join("locale/locale/common/item_list.txt")):
|
||||
print(" (skip: item_list unavailable)")
|
||||
return
|
||||
var proto: Node
|
||||
if ClassDB.class_exists("Metin2Proto"):
|
||||
proto = ClassDB.instantiate("Metin2Proto")
|
||||
get_root().add_child(proto)
|
||||
var proto_path := assets.path_join("locale/locale/en/item_proto")
|
||||
if not FileAccess.file_exists(proto_path) or not proto.call("load_item_proto", proto_path):
|
||||
proto = null
|
||||
var effects := EffectRegistry.new()
|
||||
effects.setup(assets)
|
||||
var pv := RemotePlayerView.new()
|
||||
get_root().add_child(pv)
|
||||
var parts: Array = [0, 19, 0, 5] # ARMOR / WEAPON / HEAD / HAIR
|
||||
_ck(pv.build_remote(assets, 0, parts, il), "remote warrior PlayerView builds")
|
||||
var parts: Array = [0, 3159, 0, 5] # ARMOR / TWO-HAND +9 / HEAD / HAIR
|
||||
_ck(pv.build_remote(assets, 0, parts, il, proto, Callable(), effects),
|
||||
"off-tree remote warrior PlayerView builds")
|
||||
get_root().add_child(pv) # NetWorld adds the fully assembled view this way.
|
||||
if pv.remote_equip == null:
|
||||
return
|
||||
_ck(pv.remote_equip._remote_parts == parts, "remote EquipModel receives awPart[4]")
|
||||
await process_frame
|
||||
await process_frame
|
||||
if proto:
|
||||
_ck(pv.get_motion_mode() == 3, "remote weapon 3159 -> TWOHAND_SWORD mode")
|
||||
_ck(String(pv.anim.get("anim_path")).contains("/twohand_sword/wait.msa"),
|
||||
"remote heavy-weapon wait uses two-hand grip pose")
|
||||
_ck(pv.remote_equip._weapon_refine_fx.size() == 1,
|
||||
"remote +9 heavy weapon creates one persistent refine effect")
|
||||
if pv.remote_equip._weapon_refine_fx.size() == 1:
|
||||
var refine: Node = pv.remote_equip._weapon_refine_fx[0]
|
||||
_ck(refine.get_parent() == pv,
|
||||
"remote +9 effect is attached through the character skeleton")
|
||||
var emitters := refine.find_children("*", "GPUParticles3D", true, false)
|
||||
_ck(emitters.size() > 0,
|
||||
"remote +9 sword_9 effect contains rendered GPU particles")
|
||||
var emitting := false
|
||||
for emitter in emitters:
|
||||
emitting = emitting or bool(emitter.get("emitting"))
|
||||
_ck(emitting, "remote +9 sword_9 GPU particles are actively emitting")
|
||||
pv.set_weapon(0)
|
||||
await process_frame
|
||||
_ck(int(pv.remote_equip._remote_parts[1]) == 0, "set_weapon updates awPart[WEAPON]")
|
||||
if proto:
|
||||
_ck(pv.get_motion_mode() == 1, "remote unequip -> GENERAL mode")
|
||||
pv.set_head(19)
|
||||
await process_frame
|
||||
_ck(int(pv.remote_equip._remote_parts[2]) == 19, "set_head updates awPart[HEAD]")
|
||||
|
||||
Reference in New Issue
Block a user