diff --git a/systems.cpp b/systems.cpp index c3e2df0..39e9fd9 100644 --- a/systems.cpp +++ b/systems.cpp @@ -137,14 +137,14 @@ void System::collision(DinkyECS::World &world, Player &player) { auto& item_pos = world.get(entity); auto& inventory = world.get(player.entity); - inventory.add(item); - if(world.has(entity)) { + inventory.add(item); auto &new_light = world.get(entity); world.set(player.entity, new_light); inventory.light = new_light; world.remove(entity); } else if(world.has(entity)) { + inventory.add(item); auto &weapon = world.get(entity); player_combat.damage = weapon.damage; world.remove(entity);