Skip to content

Commit

Permalink
will this fix it
Browse files Browse the repository at this point in the history
  • Loading branch information
FireMario211 authored Aug 6, 2024
1 parent ad6abf9 commit cab60cf
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -411,7 +411,15 @@ class $modify(MenuLayer) {
hThread.detach();
is_dailychest_ready = true;
}*/

if (!is_socketserver_started) {
bool startSocketServer = Mod::get()->getSettingValue<bool>("socketServer");
if (startSocketServer) {
current_socket = sio::socket::ptr();
std::thread hThread(start_socket_func);
hThread.detach();
}
is_socketserver_started = true;
}
return true;
}
};
Expand All @@ -422,12 +430,6 @@ class $modify(MenuLayer) {

chestQueue.push(1);

bool startSocketServer = Mod::get()->getSettingValue<bool>("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

Expand Down

0 comments on commit cab60cf

Please sign in to comment.