Files
systemrevivalserver/pending-clientChanges.md
T
dingo 90821277eb Add projectile state feed and diagnostics counters
- Include active projectiles in DUNGEON_STATE payload, spatially filtered

- Track per-ability projectile diagnostics (spawn/hit/expiry) in simulation

- Log periodic projectile diagnostics for ability troubleshooting

- Update pending-clientChanges.md with required projectile rendering update
2026-02-10 18:39:12 -05:00

1.4 KiB

Pending Client Changes

Status

Three client-side updates are still required for animation/loot/projectile 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).
  1. 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.
  1. Render active projectiles from projectiles in DUNGEON_STATE.
  • Server now sends active projectile entities each tick (spatial-filtered).
  • Use x/y, velocityX/velocityY, spriteKey, and linear metadata (isLinear, frontX/frontY, backX/backY) for rendering.
  • Keep existing events.projectileHits / events.projectileExpired handling for impact/cleanup effects.

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.