客户端问题修改

This commit is contained in:
shen
2026-09-07 14:53:36 +08:00
parent b19d5b5dd3
commit 61272b75e9
32 changed files with 1023 additions and 95 deletions
+8
View File
@@ -54,6 +54,8 @@ func build(assets_root: String, race: int, pump := Callable()) -> bool:
model.set("hair_gr2", hair) # 重:解 hair gr2 + 折进网格
if pump.is_valid(): pump.call()
add_child(model)
model.ready.connect(_ground_model)
_ground_model()
if ClassDB.class_exists("Metin2AnimPlayer"):
anim = ClassDB.instantiate("Metin2AnimPlayer")
@@ -196,9 +198,15 @@ func _refresh_sound_script(motion_path: String) -> void:
func _set(prop: StringName, val: Variant) -> bool:
if String(prop) in _forward and model:
model.set(prop, val)
if String(prop) == "gr2_path":
call_deferred("_ground_model")
return true
return false
func _ground_model() -> void:
if model and model.has_method("get_ground_offset"):
model.position.y = float(model.call("get_ground_offset"))
# --- 路径解析 -------------------------------------------------------------
func _resolve_dir(assets_root: String, rel: String) -> String: