mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-01-22 15:43:18 -05:00
Revert "Synchronize instructions in network_init (NT_SERVER) with network_receive_join (NT_CLIENT) (#597)"
This reverts commit 0ef9ae742e
.
This commit is contained in:
parent
66fbbc819d
commit
b49de46236
3 changed files with 18 additions and 14 deletions
|
@ -2,6 +2,7 @@
|
||||||
#include "djui.h"
|
#include "djui.h"
|
||||||
#include "djui_panel.h"
|
#include "djui_panel.h"
|
||||||
#include "djui_panel_menu.h"
|
#include "djui_panel_menu.h"
|
||||||
|
#include "djui_panel_modlist.h"
|
||||||
#include "pc/network/network.h"
|
#include "pc/network/network.h"
|
||||||
#include "pc/utils/misc.h"
|
#include "pc/utils/misc.h"
|
||||||
#include "pc/configfile.h"
|
#include "pc/configfile.h"
|
||||||
|
@ -28,6 +29,11 @@ void djui_panel_do_host(bool reconnecting, bool playSound) {
|
||||||
network_set_system(configNetworkSystem);
|
network_set_system(configNetworkSystem);
|
||||||
|
|
||||||
network_init(NT_SERVER, reconnecting);
|
network_init(NT_SERVER, reconnecting);
|
||||||
|
djui_panel_modlist_create(NULL);
|
||||||
|
fake_lvl_init_from_save_file();
|
||||||
|
|
||||||
|
extern s16 gChangeLevelTransition;
|
||||||
|
gChangeLevelTransition = gLevelValues.entryLevel;
|
||||||
|
|
||||||
if (gMarioState->marioObj) vec3f_copy(gMarioState->marioObj->header.gfx.cameraToObject, gGlobalSoundSource);
|
if (gMarioState->marioObj) vec3f_copy(gMarioState->marioObj->header.gfx.cameraToObject, gGlobalSoundSource);
|
||||||
if (playSound) { gDelayedInitSound = CHAR_SOUND_OKEY_DOKEY; }
|
if (playSound) { gDelayedInitSound = CHAR_SOUND_OKEY_DOKEY; }
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
#include "pc/configfile.h"
|
#include "pc/configfile.h"
|
||||||
#include "pc/djui/djui.h"
|
#include "pc/djui/djui.h"
|
||||||
#include "pc/djui/djui_panel.h"
|
#include "pc/djui/djui_panel.h"
|
||||||
#include "pc/djui/djui_panel_modlist.h"
|
|
||||||
#include "pc/djui/djui_hud_utils.h"
|
#include "pc/djui/djui_hud_utils.h"
|
||||||
#include "pc/djui/djui_panel_main.h"
|
#include "pc/djui/djui_panel_main.h"
|
||||||
#include "pc/utils/misc.h"
|
#include "pc/utils/misc.h"
|
||||||
|
@ -159,28 +158,26 @@ bool network_init(enum NetworkType inNetworkType, bool reconnecting) {
|
||||||
gNetworkType = inNetworkType;
|
gNetworkType = inNetworkType;
|
||||||
|
|
||||||
if (gNetworkType == NT_SERVER) {
|
if (gNetworkType == NT_SERVER) {
|
||||||
extern u8* gOverrideEeprom;
|
|
||||||
gOverrideEeprom = NULL;
|
|
||||||
|
|
||||||
extern s16 gCurrSaveFileNum;
|
extern s16 gCurrSaveFileNum;
|
||||||
gCurrSaveFileNum = configHostSaveSlot;
|
gCurrSaveFileNum = configHostSaveSlot;
|
||||||
|
|
||||||
network_player_connected(NPT_LOCAL, 0, configPlayerModel, &configPlayerPalette, configPlayerName, get_local_discord_id());
|
|
||||||
|
|
||||||
djui_chat_box_create();
|
|
||||||
djui_panel_shutdown();
|
|
||||||
|
|
||||||
fake_lvl_init_from_save_file();
|
|
||||||
|
|
||||||
mods_activate(&gLocalMods);
|
mods_activate(&gLocalMods);
|
||||||
djui_panel_modlist_create(NULL);
|
|
||||||
smlua_init();
|
smlua_init();
|
||||||
|
|
||||||
dynos_behavior_hook_all_custom_behaviors();
|
dynos_behavior_hook_all_custom_behaviors();
|
||||||
|
|
||||||
|
network_player_connected(NPT_LOCAL, 0, configPlayerModel, &configPlayerPalette, configPlayerName, get_local_discord_id());
|
||||||
|
extern u8* gOverrideEeprom;
|
||||||
|
gOverrideEeprom = NULL;
|
||||||
|
|
||||||
|
if (gCurrLevelNum != (s16)gLevelValues.entryLevel) {
|
||||||
extern s16 gChangeLevelTransition;
|
extern s16 gChangeLevelTransition;
|
||||||
gChangeLevelTransition = gLevelValues.entryLevel;
|
gChangeLevelTransition = gLevelValues.entryLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
djui_chat_box_create();
|
||||||
|
}
|
||||||
|
|
||||||
configfile_save(configfile_name());
|
configfile_save(configfile_name());
|
||||||
|
|
||||||
#ifdef DISCORD_SDK
|
#ifdef DISCORD_SDK
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include "pc/djui/djui.h"
|
#include "pc/djui/djui.h"
|
||||||
#include "pc/djui/djui_panel.h"
|
#include "pc/djui/djui_panel.h"
|
||||||
#include "pc/djui/djui_panel_modlist.h"
|
#include "pc/djui/djui_panel_modlist.h"
|
||||||
|
#include "pc/djui/djui_panel_playerlist.h"
|
||||||
#include "pc/djui/djui_panel_menu.h"
|
#include "pc/djui/djui_panel_menu.h"
|
||||||
#include "pc/djui/djui_panel_join_message.h"
|
#include "pc/djui/djui_panel_join_message.h"
|
||||||
#include "pc/utils/string_builder.h"
|
#include "pc/utils/string_builder.h"
|
||||||
|
|
Loading…
Reference in a new issue