From cab60cf3240dda3923289d42ba786ac633dd171c Mon Sep 17 00:00:00 2001 From: Fire <17692105+FireMario211@users.noreply.github.com> Date: Tue, 6 Aug 2024 19:47:25 +0000 Subject: [PATCH] will this fix it --- src/main.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 82d3d81..7519b98 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -400,8 +400,8 @@ class $modify(CCScale9Sprite) { } }; -bool is_dailychest_ready = false; - +//bool is_dailychest_ready = false; +bool is_socketserver_started = false; class $modify(MenuLayer) { bool init() { if (!MenuLayer::init()) return false; @@ -411,7 +411,15 @@ class $modify(MenuLayer) { hThread.detach(); is_dailychest_ready = true; }*/ - + if (!is_socketserver_started) { + bool startSocketServer = Mod::get()->getSettingValue("socketServer"); + if (startSocketServer) { + current_socket = sio::socket::ptr(); + std::thread hThread(start_socket_func); + hThread.detach(); + } + is_socketserver_started = true; + } return true; } }; @@ -422,12 +430,6 @@ class $modify(MenuLayer) { chestQueue.push(1); - bool startSocketServer = Mod::get()->getSettingValue("socketServer"); - if (startSocketServer) { - current_socket = sio::socket::ptr(); - std::thread hThread(start_socket_func); - hThread.detach(); - } //Discord::init(); for next update ;) // also for whatever reason, discord rpc doesnt work on vanilla gd, instead it shows absolutes MH icon for some reason even though I dont own MH. can someone explain that