[Parity][render][S1][R] 物体的非循环模式直接跳到最后一帧(箱子、门、小站开启动画永远不播),忽略 objects.txt 的 FrameCnt / Start / Sync #607

Closed
opened 2026-10-02 11:42:46 +00:00 by troytt · 0 comments
Owner

1.13c 客户端保真度审计立项(基准快照:7bd1090 / main @ 77a20c7)

证据标记说明:V-data = 1.13c MPQ 数据表 (.txt / animdata.d2 / .tbl / pal.pl2);V-src = D2MOO 逆向源码;V-bin = 1.13c DLL 反汇编;K = 1.13c 公认行为。

来源审计项:render#6 — [S1][R] 物体的非循环模式直接跳到最后一帧(箱子、门、小站开启动画永远不播),忽略 objects.txt 的 FrameCnt / Start / Sync

  • 位置:src/client/scene/world-renderer.ts:825-864(物体分支),尤其 :845-851、:839、:827-836、:875
  • 代码:
    if (!shouldLoop) { frameIndex = frameCount - 1 }            // L850-851
    const direction = ((unit.direction % dirCount) + dirCount) % dirCount   // L839,unit.direction 是 dir64
    
  • 原版:进入模式时 dwFrameCountPrecise = FrameCnt[mode],nSeqCurrentFramePrecise = Start[mode] << 8;速度在 Sync 为真时等于 FrameDelta,否则为 FrameDelta - FrameDelta/16 + rand(FrameDelta/8)(证据:V-src D2Common/src/Units/Units.cpp:768-793)。非循环模式(CycleAnim=0)从 Start 播到 FrameCnt 后停在末帧,而不是一进入就是末帧。例:V-data objects.txt #119 Waypoint FrameCnt1 15 / CycleAnim1 0(激活动画 15 帧),FrameCnt2 8 / CycleAnim2 1。
  • 影响:
    • 开箱、开门、激活小站、打开石棺 / 武器架等 OP 动画一帧都看不到,直接跳到"已打开"状态。
    • 帧数用 DCC 组长度,而不是 FrameCnt。
    • 起始帧(Start)和非 Sync 物体的随机速度(同类火盆不同步)没有实现。
    • 方向直接拿 dir64 对 dirCount 取模,没有用 dir64ToClipDirection;对多方向物体会选错方向。
    • clip 兜底链(on↔op 互换、nu、Object.keys(...)[0])属于 F 类。
    • 悬停时 1.25 的 tint 见 S3「hover」条。
  • 建议:物体动画改为与单位相同的一次性 / 循环计时器(记录模式切换时刻),帧数取 FrameCnt[mode],起始取 Start[mode],速度按 Sync / FrameDelta 公式;方向用 dir64ToClipDirection;删掉 clip 互换兜底。
  • 已有 issue:—(#540 只讲缺图时画色块,与本条无关)
> **1.13c 客户端保真度审计立项**(基准快照:`7bd1090` / `main @ 77a20c7`) > 证据标记说明:`V-data` = 1.13c MPQ 数据表 (`.txt` / `animdata.d2` / `.tbl` / `pal.pl2`);`V-src` = D2MOO 逆向源码;`V-bin` = 1.13c DLL 反汇编;`K` = 1.13c 公认行为。 ### 来源审计项:`render#6` — [S1][R] 物体的非循环模式直接跳到最后一帧(箱子、门、小站开启动画永远不播),忽略 objects.txt 的 FrameCnt / Start / Sync - 位置:`src/client/scene/world-renderer.ts:825-864`(物体分支),尤其 `:845-851`、`:839`、`:827-836`、`:875` - 代码: ```ts if (!shouldLoop) { frameIndex = frameCount - 1 } // L850-851 const direction = ((unit.direction % dirCount) + dirCount) % dirCount // L839,unit.direction 是 dir64 ``` - 原版:进入模式时 `dwFrameCountPrecise = FrameCnt[mode]`,`nSeqCurrentFramePrecise = Start[mode] << 8`;速度在 `Sync` 为真时等于 `FrameDelta`,否则为 `FrameDelta - FrameDelta/16 + rand(FrameDelta/8)`(证据:V-src `D2Common/src/Units/Units.cpp:768-793`)。非循环模式(CycleAnim=0)从 Start 播到 FrameCnt 后停在末帧,而不是一进入就是末帧。例:V-data `objects.txt` #119 Waypoint FrameCnt1 15 / CycleAnim1 0(激活动画 15 帧),FrameCnt2 8 / CycleAnim2 1。 - 影响: - 开箱、开门、激活小站、打开石棺 / 武器架等 OP 动画一帧都看不到,直接跳到"已打开"状态。 - 帧数用 DCC 组长度,而不是 FrameCnt。 - 起始帧(Start)和非 Sync 物体的随机速度(同类火盆不同步)没有实现。 - 方向直接拿 dir64 对 `dirCount` 取模,没有用 `dir64ToClipDirection`;对多方向物体会选错方向。 - clip 兜底链(on↔op 互换、nu、`Object.keys(...)[0]`)属于 F 类。 - 悬停时 1.25 的 tint 见 S3「hover」条。 - 建议:物体动画改为与单位相同的一次性 / 循环计时器(记录模式切换时刻),帧数取 FrameCnt[mode],起始取 Start[mode],速度按 Sync / FrameDelta 公式;方向用 `dir64ToClipDirection`;删掉 clip 互换兜底。 - 已有 issue:—(#540 只讲缺图时画色块,与本条无关)
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: troytt/diablo2-web#607
No description provided.