[动画] 玩家动画模式:本地移动带动所有玩家播放行走、城镇缺 TN/TW、帧时长写死 #544
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
现象
1.13c 依据
PlrMode.txt):0 DT, 1 NU, 2 WL, 3 RN, 4 GH, 5 TN, 6 TW, 7 A1, 8 A2, 9 BL, 10 SC, …, 17 DD。src/client/scene/world-renderer.ts的PLAYER_MODE_TO_CLIP已经按这个编号映射了5 → 'tn'、6 → 'tw'。代码现状(main@ff1f8e4)
world-renderer.tsL409-L415,drawSceneUnitDrawable的玩家分支:ctx.playerMoving来自main.tsL891 的session.predictor.getSnapshot().moving,只表示本地玩家是否在移动。unitKind === 'player'的绘制对象上(现象 1)。online-session.tsL1213:本地玩家的 mode 是predSnap.moving ? (predSnap.running ? 3 : 2) : 1,在城镇里也永远不会是 5/6(现象 2)。world-renderer.tsL435-L436:玩家帧时长Math.floor(nowMs / 65)/Math.floor(nowMs / 140)(现象 3)。待确认(不要猜常数)
0x0D带的 mode 字节目前被解码器丢弃;还有0x0F/0x10/0x15等)里的 mode 和客户端本地推断谁优先?AnimData.d2的每方向帧数和速度。PlrMode.txt/MonMode.txt的相关列。0x7F/ 走跑速度)挂钩。期望修复
mode。删掉ctx.playerMoving对其他玩家的影响;本地玩家的移动状态通过它自己的 drawablemode表达。nuclip。tn/twclip。相关
fix/unit-facing(commit0712b80,尚未合并到 main),只修了朝向,没有动上面这些逻辑。online-session.ts的 mode 那一行会移到 L1258 附近)。更新(2026-10-02):
fix/unit-facing已合并到 main(8fcd223)。正文里的0712b80现在是dd775c8。本 issue 的问题在 main@
8fcd223上仍然存在。更新后的行号:world-renderer.tsL410-L417:isMoving和requestedClipKey仍然取全局的ctx.playerMoving。所以本地玩家一移动,所有玩家都切到 WL/TW。online-session.tsL1325-L1335 的selfMode决定(8dac79e引入)。同一区域还有一处问题。这是读代码确认的,没有改:
selfMode = 12。PlrMode.txt(plr-mode.ts),玩家的 12 是 KK(Kick)。死亡应该是 DT(0)或 DD(17)。12 是MonMode.txt里的 DD。PLAYER_MODE_TO_CLIP里没有 12,于是回落到nu;又因为isCorpse,取的是最后一帧。结果是死亡的本地玩家画成站立姿势。