[P2][D18] 多人锁步掉落同步:net-scene 接入 executeDropPipeline(共享 PRNG seed) #427

Closed
opened 2026-09-24 03:25:59 +00:00 by troytt · 1 comment
Owner

现状

src/scene/net-scene.ts:631-648 的 tickCombatMulti 推进锁步模拟时
完全忽略 world.events 中的 kill 事件,从不调用 executeDropPipeline。
→ 多人模式下打怪不掉任何东西。

1.13c 真实行为

服务端以怪物 dwInitSeed 决定掉落,所有客户端看到完全一致的物品。

验收标准

  • net-scene 以与 engine.ts 完全相同的顺序与参数调用 executeDropPipeline。
  • 掉落 RNG 使用随 kill 事件同步的怪物 seed,而非各客户端本地 RNG。
  • gamePlayers / partyPlayers 由真实会话人数驱动(与 D09 协同)。
  • vitest:两个客户端同一 seed 序列下,掉落物品列表(含品质、词缀、落点)逐项相等。
  • 拾取竞态:同一物品只能被一名玩家拾取成功。
## 现状 `src/scene/net-scene.ts:631-648` 的 `tickCombatMulti` 推进锁步模拟时 **完全忽略 `world.events` 中的 `kill` 事件**,从不调用 `executeDropPipeline`。 → 多人模式下打怪不掉任何东西。 ## 1.13c 真实行为 服务端以怪物 `dwInitSeed` 决定掉落,所有客户端看到完全一致的物品。 ## 验收标准 - [ ] `net-scene` 以与 `engine.ts` 完全相同的顺序与参数调用 `executeDropPipeline`。 - [ ] 掉落 RNG 使用随 kill 事件同步的怪物 seed,而非各客户端本地 RNG。 - [ ] `gamePlayers` / `partyPlayers` 由真实会话人数驱动(与 D09 协同)。 - [ ] vitest:两个客户端同一 seed 序列下,掉落物品列表(含品质、词缀、落点)逐项相等。 - [ ] 拾取竞态:同一物品只能被一名玩家拾取成功。
troytt added this to the [M18] 打怪掉落物品:怪物死亡掉落全链路 1.13c 还原 milestone 2026-09-24 03:25:59 +00:00
Author
Owner

Resolution Summary (Issue #427 — Commit 9022579)

  • Connected src/scene/net-scene.ts (createNetSimulation) to executeDropPipeline seeded deterministically from monster.dwInitSeed and findSafeDropPosition.\n- Mixed ground and inventory item metadata into computeLockstepHash in src/net/lockstep.ts.

  • Verification: npx tsc --noEmit (0 errors), full Vitest drop/combat/item/E2E parity suites (100% pass), and scripts/verify-m5.ts / scripts/verify-net.ts (0 problems).

### Resolution Summary (Issue #427 — Commit `9022579`) - Connected `src/scene/net-scene.ts` (`createNetSimulation`) to `executeDropPipeline` seeded deterministically from `monster.dwInitSeed` and `findSafeDropPosition`.\n- Mixed ground and inventory item metadata into `computeLockstepHash` in `src/net/lockstep.ts`. - **Verification**: `npx tsc --noEmit` (0 errors), full Vitest drop/combat/item/E2E parity suites (100% pass), and `scripts/verify-m5.ts` / `scripts/verify-net.ts` (0 problems).
Sign in to join this conversation.
No Label
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#427
No description provided.