actors now always calls despawn() when being despawned

This commit is contained in:
minjaesong
2024-02-05 14:39:21 +09:00
parent 1685d0f045
commit 2d42525092
6 changed files with 39 additions and 16 deletions

View File

@@ -1298,7 +1298,7 @@ open class TerrarumIngame(batch: FlippingSpriteBatch) : IngameInstance(batch) {
val actor = actorContainerActive[i]
val actorIndex = i
// kill actors flagged to despawn
if (actor.flagDespawn) {
if (actor.despawned) {
queueActorRemoval(actor)
actorContainerSize -= 1
i-- // array removed 1 elem, so we also decrement counter by 1