feat(playable): 首个 Mac 联网内测版 STB-01 soak 工具与发布状态文档
- 新增 script/playable_soak.sh:先做 soak 配置/资源校验,无 --allow-gameplay 只校验不启动客户端;N(>=10) 次独立正常退出运行 + 墙钟 soak,失败即停止后续 运行并记 BLOCKED;写本批次 release-manifest.json 后聚合 - run_client_gate.sh:确认的故障代理对所有 suite 启动(共享场景的退出运行也经代理); soak 超时下限只约束 soak 客户端(validate_soak 增加 soak_client 参数) - 新增本地 127.0.0.1 故障代理、RSS 采样/内存判定、窗口/指标/流程模块及其测试 - forest_mob_render_test 输出 PASS/FAIL 标记,供 rendering_batch_test.sh 识别 - 新增 docs/FIRST-MAC-PLAYABLE-STATUS.md:如实记录 PASS/BLOCKED、已知问题与环境需求 - .gitignore 排除本地场景配置、凭据文件与运行输出 离线回归:rendering_batch_test.sh failures=0,playable_gate_test.sh PASS, node 夹具测试 PASS。未联网运行,未重建候选包。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ft3kXpNdLbKEfg5uDLfqVF
This commit is contained in:
+33
-13
@@ -28,6 +28,7 @@ var anim: Node # Metin2AnimPlayer
|
||||
var _dir := ""
|
||||
var _motions := {} # MOTION_NAME(String) -> 绝对 .msa 路径
|
||||
var _state := ""
|
||||
var _last_resolution := {}
|
||||
var _audio: Node
|
||||
var _sound_instances: Array = []
|
||||
var _sound_frame := -1
|
||||
@@ -125,8 +126,10 @@ func set_anim_state(s: String) -> void:
|
||||
if s == _state or anim == null:
|
||||
return
|
||||
_state = s
|
||||
var msa := _motion_for(s)
|
||||
_last_resolution = resolve_motion(s)
|
||||
var msa := String(_last_resolution.path)
|
||||
if msa == "":
|
||||
# 旧客户端 GetMotionKey 失败时 SetLoopMotion/InterceptMotion 直接返回:保留当前动作。
|
||||
return
|
||||
anim.set("loop", s in ["wait", "walk", "run"])
|
||||
anim.set("anim_path", msa)
|
||||
@@ -136,7 +139,35 @@ func set_anim_state(s: String) -> void:
|
||||
# the selected .msa before playback lets the test distinguish a real action
|
||||
# from a silent "keep the previous animation" fallback.
|
||||
func get_motion_path(state: String) -> String:
|
||||
return _motion_for(state)
|
||||
return String(resolve_motion(state).path)
|
||||
|
||||
## requested_state / motion / path / fallback_reason。fallback_reason:
|
||||
## "" 首选动作名命中
|
||||
## "client_alias:<NAME>" 本客户端的同类动作别名(如 run -> WALK)
|
||||
## "motlist_missing:<file>" motlist 未列出,按目录里的 <name>.msa 兜底
|
||||
## "reference_keep_current_motion" 资源没有任何候选动作;与旧客户端一致保留当前动作
|
||||
func resolve_motion(state: String) -> Dictionary:
|
||||
var names: Array = STATE_MOTIONS.get(state, [])
|
||||
var out := {"requested_state": state, "motion": "", "path": "", "fallback_reason": ""}
|
||||
for mo: String in names:
|
||||
if _motions.has(mo):
|
||||
out.motion = mo
|
||||
out.path = String(_motions[mo])
|
||||
if mo != String(names[0]):
|
||||
out.fallback_reason = "client_alias:" + mo
|
||||
return out
|
||||
for mo: String in names:
|
||||
var p := _dir.path_join(mo.to_lower() + ".msa")
|
||||
if FileAccess.file_exists(p):
|
||||
out.motion = mo
|
||||
out.path = p
|
||||
out.fallback_reason = "motlist_missing:" + p.get_file()
|
||||
return out
|
||||
out.fallback_reason = "reference_keep_current_motion"
|
||||
return out
|
||||
|
||||
func last_motion_resolution() -> Dictionary:
|
||||
return _last_resolution.duplicate()
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
if _audio == null or anim == null or _sound_instances.is_empty() or not anim.has_method("get_time") \
|
||||
@@ -194,17 +225,6 @@ func _folder_candidates(proto: Node, race: int) -> Array:
|
||||
out.append(c)
|
||||
return out
|
||||
|
||||
func _motion_for(state: String) -> String:
|
||||
for mo: String in STATE_MOTIONS.get(state, []):
|
||||
if _motions.has(mo):
|
||||
return _motions[mo]
|
||||
# 兜底:目录里有 <mo>.msa 直接用
|
||||
for mo: String in STATE_MOTIONS.get(state, []):
|
||||
var p := _dir.path_join(mo.to_lower() + ".msa")
|
||||
if FileAccess.file_exists(p):
|
||||
return p
|
||||
return _motions.get("WAIT", "")
|
||||
|
||||
func _load_motlist() -> void:
|
||||
var ml := _dir.path_join("motlist.txt")
|
||||
if not FileAccess.file_exists(ml):
|
||||
|
||||
Reference in New Issue
Block a user