Prevent main menu player model from corrupting while joining

This commit is contained in:
MysterD 2021-08-11 00:19:47 -07:00
parent 1fa46651a0
commit b50cca937d
3 changed files with 2 additions and 2 deletions

View File

@ -29,6 +29,7 @@ void djui_init(void) {
void djui_connect_menu_open(void) { void djui_connect_menu_open(void) {
djui_panel_shutdown(); djui_panel_shutdown();
gDjuiInMainMenu = true;
djui_panel_main_create(NULL); djui_panel_main_create(NULL);
djui_panel_join_create(NULL); djui_panel_join_create(NULL);
djui_panel_join_message_create(NULL); djui_panel_join_message_create(NULL);

View File

@ -86,8 +86,6 @@ bool network_init(enum NetworkType inNetworkType) {
gOverrideEeprom = NULL; gOverrideEeprom = NULL;
djui_chat_box_create(); djui_chat_box_create();
} else if (gNetworkType == NT_CLIENT) {
network_player_connected(NPT_SERVER, 0, 0, 0, "Player");
} }
LOG_INFO("initialized"); LOG_INFO("initialized");

View File

@ -3,6 +3,7 @@
#include "game/save_file.h" #include "game/save_file.h"
void network_send_save_file(s32 fileIndex) { void network_send_save_file(s32 fileIndex) {
if (gNetworkPlayerServer == NULL) { return; }
assert(gNetworkType == NT_CLIENT); assert(gNetworkType == NT_CLIENT);
struct Packet p; struct Packet p;
packet_init(&p, PACKET_SAVE_FILE, true, false); packet_init(&p, PACKET_SAVE_FILE, true, false);