Skip to content

fix: add destroyed entity validation across game systems#1290

Merged
braedonsaunders merged 1 commit into
mainfrom
claude/analyze-codebase-Kn7xQ
Feb 3, 2026
Merged

fix: add destroyed entity validation across game systems#1290
braedonsaunders merged 1 commit into
mainfrom
claude/analyze-codebase-Kn7xQ

Conversation

@braedonsaunders

Copy link
Copy Markdown
Owner
  • Add validateEntityAlive() helper to EntityValidator that checks both null and isDestroyed() state for stored entity ID references
  • Apply systematic isDestroyed() checks to 30+ locations across:
    • CombatSystem: attack queue, target acquisition, splash damage
    • ResourceSystem: gather commands, worker update, resource return
    • ProjectileSystem: homing targets, impact damage, splash damage
    • AbilitySystem: all ability executions and delayed effects
    • MovementOrchestrator: attack-move, patrol, attacking units
    • ProductionSystem: production/cancel/reorder commands, upgrades
  • Remove unused dead code from graphics settings:
    • taaHistoryBlendRate from uiStore and PostProcessing
    • outlineEnabled/outlineStrength from uiStore (never wired up)

This prevents potential bugs from operating on destroyed entities during the same tick they're marked for destruction.

https://claude.ai/code/session_01UmxaG5s7rB9Y6hcEBxw7Mf

- Add validateEntityAlive() helper to EntityValidator that checks both
  null and isDestroyed() state for stored entity ID references
- Apply systematic isDestroyed() checks to 30+ locations across:
  - CombatSystem: attack queue, target acquisition, splash damage
  - ResourceSystem: gather commands, worker update, resource return
  - ProjectileSystem: homing targets, impact damage, splash damage
  - AbilitySystem: all ability executions and delayed effects
  - MovementOrchestrator: attack-move, patrol, attacking units
  - ProductionSystem: production/cancel/reorder commands, upgrades
- Remove unused dead code from graphics settings:
  - taaHistoryBlendRate from uiStore and PostProcessing
  - outlineEnabled/outlineStrength from uiStore (never wired up)

This prevents potential bugs from operating on destroyed entities
during the same tick they're marked for destruction.

https://claude.ai/code/session_01UmxaG5s7rB9Y6hcEBxw7Mf
@braedonsaunders braedonsaunders merged commit 71d3a99 into main Feb 3, 2026
4 checks passed
@braedonsaunders braedonsaunders deleted the claude/analyze-codebase-Kn7xQ branch February 3, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants