fix(client): default item unitDrawable.frame to 0 across ticks and commit baked ui manifest/atlas (#540)
This commit is contained in:
parent
1b93827103
commit
55584da799
Binary file not shown.
|
Before Width: | Height: | Size: 701 KiB After Width: | Height: | Size: 1.9 MiB |
262751
public/ui/manifest.json
262751
public/ui/manifest.json
File diff suppressed because it is too large
Load Diff
|
|
@ -421,7 +421,7 @@ export function buildSceneDrawables(
|
||||||
goldAmount: unit.goldAmount,
|
goldAmount: unit.goldAmount,
|
||||||
mode: unit.mode ?? 0,
|
mode: unit.mode ?? 0,
|
||||||
direction: dir,
|
direction: dir,
|
||||||
frame: unit.frame ?? (tick % 8),
|
frame: unit.frame ?? (unit.kind === 'item' ? 0 : (tick % 8)),
|
||||||
subX: unit.x,
|
subX: unit.x,
|
||||||
subY: unit.y,
|
subY: unit.y,
|
||||||
worldX,
|
worldX,
|
||||||
|
|
|
||||||
|
|
@ -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')
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue