Skip to content

Commit

Permalink
fix family onRemoveHook order for global hook
Browse files Browse the repository at this point in the history
  • Loading branch information
Quillraven committed Dec 3, 2023
1 parent 9a94d14 commit 73aced9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commonMain/kotlin/com/github/quillraven/fleks/world.kt
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ class WorldConfiguration(@PublishedApi internal val world: World) {
val ownHook = family.removeHook
val systemArray = systemList.toTypedArray()
family.removeHook = if (ownHook != null) { entity ->
ownHook(world, entity)
systemArray.forEachReverse { it.onRemoveEntity(entity) }
ownHook(world, entity)
} else { entity ->
systemArray.forEachReverse { it.onRemoveEntity(entity) }
}
Expand Down

0 comments on commit 73aced9

Please sign in to comment.