diff --git a/TR5Main/Game/newinv2.cpp b/TR5Main/Game/newinv2.cpp index bb8634538..8ec733cd4 100644 --- a/TR5Main/Game/newinv2.cpp +++ b/TR5Main/Game/newinv2.cpp @@ -2844,13 +2844,11 @@ void InventoryClass::handle_inventry_menu() case MENU_TYPE_LOAD: //fill_up_savegames_array//or maybe not? invMode = IM_LOAD; - selected_slot = 0; break; case MENU_TYPE_SAVE: //fill_up_savegames_array invMode = IM_SAVE; - selected_slot = 0; break; case MENU_TYPE_EXAMINE: @@ -3554,6 +3552,12 @@ int InventoryClass::S_CallInventory2(bool reset_mode) if (useItem && !TrInput) val = 1; + if (ExitInvLoop) + { + ExitInvLoop = 0; + val = 1; + } + Camera.numberFrames = g_Renderer.SyncRenderer(); if (val) @@ -3709,7 +3713,7 @@ void InventoryClass::do_save() { SoundEffect(SFX_TR4_MENU_CHOOSE, 0, SFX_ALWAYS); //SaveSelectedSlot(selected_slot); - return; + ExitInvLoop = 1; //exit inv if the user has saved } if (goDeselect) diff --git a/TR5Main/Game/newinv2.h b/TR5Main/Game/newinv2.h index 5ecd7d5dd..be151f983 100644 --- a/TR5Main/Game/newinv2.h +++ b/TR5Main/Game/newinv2.h @@ -496,6 +496,7 @@ private: int inventoryItemChosen; int enterInventory; int lastInvItem; + bool ExitInvLoop; //ammo vars unsigned short AmountShotGunAmmo1; @@ -535,10 +536,10 @@ private: //pause int pause_flag; pause_menus pause_menu_to_display = pause_main_menu; - short pause_selected_option = 0; + short pause_selected_option; //title - short title_selected_option = 0; + short title_selected_option; title_menus title_menu_to_display = title_main_menu; int settings_flag;