diff --git a/CHANGELOG.md b/CHANGELOG.md index 839000fbf..de11c2375 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ - fixed `/kill` console command not fully killing enemies (#1482, regression from 3.0) - fixed `/tp` console command not always picking the closest item (#1486, regression from 4.1) - fixed `/tp` console command reporting teleport fails as success (#1484, regression from 4.1) +- fixed `/tp` console command allowing teleporting to consumed savegame crystals (#1518) - fixed `/set` console command not sanitizing numeric values (#1515) - fixed console commands causing improper ring shutdown with selected inventory item (#1460, regression from 3.0) - fixed console input immediately ending demo (#1480, regression from 4.1) diff --git a/src/game/console_cmd.c b/src/game/console_cmd.c index c55428703..258ca62a5 100644 --- a/src/game/console_cmd.c +++ b/src/game/console_cmd.c @@ -184,9 +184,10 @@ static COMMAND_RESULT Console_Cmd_Teleport(const char *const args) for (int16_t item_num = 0; item_num < Item_GetTotalCount(); item_num++) { const ITEM_INFO *const item = &g_Items[item_num]; - const bool is_pickup = - Object_IsObjectType(item->object_id, g_PickupObjects); - if (is_pickup + const bool is_consumable = + Object_IsObjectType(item->object_id, g_PickupObjects) + || item->object_id == O_SAVEGAME_ITEM; + if (is_consumable && (item->status == IS_INVISIBLE || item->status == IS_DEACTIVATED)) { continue;