Skip to content

fix(ecs): ignore double kill so spawn never reuses an id - #534

Merged
Tchips46 merged 1 commit into
mainfrom
fix/ecs/multiple-kills-of-same-entity
Dec 3, 2026
Merged

Tchips46 merged 1 commit into
mainfrom
fix/ecs/multiple-kills-of-same-entity

Conversation

@Tchips46

@Tchips46 Tchips46 commented Dec 3, 2026

Copy link
Copy Markdown
Member

Resolves #479

What does this PR do?

kill_entity now returns early when the id is >= _next_entity or already in _dead_entities, so a second kill no longer queues the same id twice. Adds a double-kill test to the client and server ECS specs.

How do you test this PR?

Run the ECS specs (client and server). The new test "should ignore a second kill of the same entity" kills an entity twice, then checks that the next two spawns get the recycled id once and a different id after it.

@Tchips46 Tchips46 self-assigned this Dec 3, 2026
@Tchips46
Tchips46 force-pushed the fix/ecs/multiple-kills-of-same-entity branch from a314516 to 59078a0 Compare December 3, 2026 12:41
@Tchips46
Tchips46 merged commit 544d37f into main Dec 3, 2026
7 of 8 checks passed
@Tchips46
Tchips46 deleted the fix/ecs/multiple-kills-of-same-entity branch December 3, 2026 13:15
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.

fix(ecs): killing an entity twice makes spawnEntity return the same id twice

2 participants