You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
set spawn_despawn on the correct entity when despawning (#21364)
# Objective
Fixes#21293Fixes#17314 to ensure that this is tested correctly.
## Solution
when despawning an entity, previously the swapped in (archetype) or
moved in entity (table) (which both require extra bookkeeping to update
archetype or table rows) were marked as `spawned_or_despawned` by the
location and tick that the to-be-removed entity was meant to be marked,
while the to-be-removed entity wasn't marked.
As pointed out by @akimakinai in
[#19047](#19047), I've re-added
the correct `mark_spawn_despawn` call to `despawn_with_caller`.
## Testing
I've added a test `spawned_after_swap_remove` that ensures that
despawning an entity by swapping doesn't effect other entities
`spawned_or_despawned` location, and that it does effect the despawned
entity's index's `spawned_or_despawned` location.
Co-Authored By: [email protected]
---------
Co-authored-by: WaterWhisperer <[email protected]>
0 commit comments