Small bug fixes to Stop Hosting (#161)

Previously you could exit during the act select screen and even crash the game by entering a door and then pressing Stop Host.
This commit is contained in:
Agent X 2022-08-25 20:33:47 -04:00 committed by GitHub
parent 7e1110cde9
commit 01035c895a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View file

@ -20,7 +20,7 @@
#include "object_list_processor.h"
#include "ingame_menu.h"
#include "obj_behaviors.h"
#include "game/object_helpers.h"
#include "object_helpers.h"
#include "save_file.h"
#include "hardcoded.h"
#include "debug_course.h"

View file

@ -1,7 +1,10 @@
#include "djui.h"
#include "pc/cheats.h"
#include "src/pc/pc_main.h"
#include "src/pc/network/network.h"
#include "pc/pc_main.h"
#include "pc/network/network.h"
#include "game/object_helpers.h"
#include "behavior_table.h"
#include "sm64.h"
bool gDjuiPanelPauseCreated = false;
@ -14,6 +17,8 @@ static void djui_panel_pause_quit_yes(UNUSED struct DjuiBase* caller) {
}
static void djui_panel_pause_quit(struct DjuiBase* caller) {
if (find_object_with_behavior(bhvActSelector) != NULL || gMarioStates[0].action == ACT_PUSHING_DOOR || gMarioStates[0].action == ACT_PULLING_DOOR) { return; }
if (gNetworkType == NT_SERVER) {
djui_panel_confirm_create(caller,
"\\#ff0800\\Q\\#1be700\\U\\#00b3ff\\I\\#ffef00\\T",