- Add server-side payload-time normalization to prevent alive mobs from being sent with dead/hurt animations - Enforce dead state/death animation payload consistency for non-alive mobs - Apply normalization in both dungeon enter flows and recurring dungeon state sends - Update pending-clientChanges.md: client must treat currentAnimation as authoritative and gate loot prompt by hasLoot
24 lines
1.1 KiB
Markdown
24 lines
1.1 KiB
Markdown
# Pending Client Changes
|
|
|
|
## Status
|
|
Two client-side updates are still required for animation/loot interaction consistency.
|
|
|
|
## Required Client Update
|
|
1. Gate loot prompt (`E`) by `hasLoot`.
|
|
- Server now sends `hasLoot` for each mob in join/state payloads.
|
|
- Show corpse loot interaction only when:
|
|
- `isAlive == false`
|
|
- `hasLoot == true`
|
|
- Hide loot interaction if `hasLoot == false` (corpse remains, but not lootable).
|
|
|
|
2. Treat `currentAnimation` as authoritative on mob update.
|
|
- Server now sends `currentAnimation` on join/state payloads.
|
|
- On each update for an existing mob entity, client should apply server animation directly.
|
|
- Do not keep a previous local animation state when server sends a different value.
|
|
|
|
## Notes
|
|
1. Server now includes `isAlive`/`hasLoot`/`currentAnimation` consistently in mob payloads and sends `mobCatalog` on dungeon-enter responses and one-time in dungeon state.
|
|
2. If invisible mobs still occur, keep a fallback render path when `spriteConfig` is null:
|
|
- Use `definitionId` -> local/default sprite mapping.
|
|
- Apply default tint `#ffffff` and scale `1.0`.
|