From 956ff39b6989f8ce5104ba0fec6b4e5a287f8b69 Mon Sep 17 00:00:00 2001 From: Nelson Earle Date: Sun, 7 Jan 2024 11:27:13 -0600 Subject: [PATCH] fix: Kick Bomb can't be used (#896) While working on the jellyfish I noticed that the kick bomb wasn't working. When spawned they didn't get an `ElementHandle` component (or `MapElementHydrated`). Without an element handle the `update_idle_kick_bombs` system always skipped over them, preventing them from being used. --- src/core/elements/kick_bomb.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/elements/kick_bomb.rs b/src/core/elements/kick_bomb.rs index ca76ff06af..ffa0d82e9c 100644 --- a/src/core/elements/kick_bomb.rs +++ b/src/core/elements/kick_bomb.rs @@ -62,7 +62,7 @@ fn hydrate( mut atlas_sprites: CompMut, assets: Res, mut hydrated: CompMut, - element_handles: Comp, + mut element_handles: CompMut, mut animated_sprites: CompMut, mut respawn_points: CompMut, mut spawner_manager: SpawnerManager, @@ -95,6 +95,8 @@ fn hydrate( hydrated.insert(spawner_ent, MapElementHydrated); let entity = entities.create(); + hydrated.insert(entity, MapElementHydrated); + element_handles.insert(entity, element_handle); items.insert(entity, Item); item_throws.insert( entity,