diff --git a/wadsrc/static/zscript/shared/player_inventory.txt b/wadsrc/static/zscript/shared/player_inventory.txt index 228e2bbf80..c71c1f3d8b 100644 --- a/wadsrc/static/zscript/shared/player_inventory.txt +++ b/wadsrc/static/zscript/shared/player_inventory.txt @@ -309,7 +309,8 @@ extend class PlayerPawn while (player.health < 50) { - if (!UseInventory (Items[index])) + let item = Items[index]; + if (item == null || !UseInventory (item)) break; } if (player.health >= 50) return;