[Parity][motion-input][S1][H] 远程单位(怪物、NPC、佣兵、其他玩家)的移动速度一律用玩家的基础走/跑常量 9 / 13.5 #586
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?
来源审计项:
motion-input#6— [S1][H] 6. 远程单位(怪物、NPC、佣兵、其他玩家)的移动速度一律用玩家的基础走/跑常量 9 / 13.5src/client/motion/interpolate.ts:77-102(resolveRemoteMoveSpeed回退到D2_BASE_*)、:133(spawnOrSnap写死步行速度);session/online-session.ts:1406-1414(调用startMove时不传speedSubTilesPerSec和moveType)。范围外的根因:netproto/d2gs/s2c/movement.ts:124-159(0x67 只读了 id/moveType/x/y;0x68 只读到 targetId 为止)speedSubTilesPerSec: running ? D2_BASE_RUN_SUBTILES_PER_SEC : D2_BASE_WALK_SUBTILES_PER_SECUNITS_GetBaseVelocity:玩家 = charstatsWalkVelocity << 8,怪物 = monstatsVelocity << 8(V-src D2CommonUnits.cpp:1288-1299),再乘以nVelocityPercent / 100(Units.cpp:1672-1693)。nPathType,0x0D 为 int16nVelocity,0x0F 为 maxDistance)和 0x68(0x11 为nPathType,0x12 为nVelocity)里下发怪物当前的STAT_VELOCITYPERCENT(V-srcD2CommonDefinitions/include/D2PacketDef.h:1457-1485;D2GameSCmd.cpp:329-374、377-417)。monstats.txt,Velocity/Run):zombie1 #5 为 1/3,akara #148 为 1/1,cain1 #146 为 2/2,quillrat1 #63 为 3/3,fallen1 #19 为 5/5,act2guard1 #203 为 4/7,roguehire #271 为 7/11,navi #266 为 8/8。interpolate.ts:24的 5 子格)。每个场景都能看到。另外,interpolate.ts:77-82的注释说"bit 0x10 表示跑",代码判断的却是 0x17 / 0x18 /&0x02,注释和实现不一致。nPathType、nVelocity、maxDistance。插值器按单位的 monstatsVelocity/Run(玩家用 charstats)乘以nVelocity / 100计算速度,并保留 25% 下限。spawnOrSnap不要预置速度。