fix(client): default item unitDrawable.frame to 0 across ticks and commit baked ui manifest/atlas (#540)

This commit is contained in:
troytt 2026-10-01 18:20:38 +00:00
parent 1b93827103
commit 55584da799
4 changed files with 259112 additions and 3663 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 701 KiB

After

Width:  |  Height:  |  Size: 1.9 MiB

File diff suppressed because it is too large Load Diff

View File

@ -421,7 +421,7 @@ export function buildSceneDrawables(
goldAmount: unit.goldAmount,
mode: unit.mode ?? 0,
direction: dir,
frame: unit.frame ?? (tick % 8),
frame: unit.frame ?? (unit.kind === 'item' ? 0 : (tick % 8)),
subX: unit.x,
subY: unit.y,
worldX,

View File

@ -176,6 +176,28 @@ describe('Authentic Diablo II v1.13c Ground Items Flippy Parity', () => {
}
}
})
it('defaults item unitDrawable.frame to 0 when unit.frame is undefined even on non-zero ticks', async () => {
const { buildSceneDrawables } = await import('../src/client/view/unit-drawables.ts')
const out = buildSceneDrawables(
[
{
id: 777,
kind: 'item',
classId: 0,
code: 'cap',
name: 'cap',
x: 100,
y: 100,
mode: 5,
},
],
{ tick: 5 },
)
expect(out.unitDrawables).toHaveLength(1)
expect(out.unitDrawables[0]!.frame).toBe(0)
expect(out.unitDrawables[0]!.token).toBe('cap')
})
})
})