diff --git a/src/custom/vehcustmzr.cpp b/src/custom/vehcustmzr.cpp index d606f7e..a3bab9c 100644 --- a/src/custom/vehcustmzr.cpp +++ b/src/custom/vehcustmzr.cpp @@ -286,7 +286,7 @@ VehCustmzrMgr::VehCustmzrMgr() m_Neon.m_nTrafficTimer = timer; } - if (m_Nitro.m_bEnabled && FindPlayerVehicle(-1, false)->m_nVehicleSubClass == VEHICLE_AUTOMOBILE) + if (m_Nitro.m_bEnabled && pVeh && pVeh->m_nVehicleSubClass == VEHICLE_AUTOMOBILE) { patch::Set(0x969165, 0, true); // All cars have nitro patch::Set(0x96918B, 0, true); // All taxis have nitro diff --git a/src/defines.h b/src/defines.h index 6249395..d65b0f2 100644 --- a/src/defines.h +++ b/src/defines.h @@ -8,7 +8,7 @@ #define IMGUI_DEFINE_MATH_OPERATORS #define MENU_NAME "Cheat Menu" -#define MENU_VERSION_NUMBER "3.5" +#define MENU_VERSION_NUMBER "3.51" #define MENU_VERSION MENU_VERSION_NUMBER #define MENU_TITLE MENU_NAME " v" MENU_VERSION diff --git a/src/pages/menu.cpp b/src/pages/menu.cpp index 2f271bd..ebd1f69 100644 --- a/src/pages/menu.cpp +++ b/src/pages/menu.cpp @@ -11,7 +11,9 @@ MenuPage& menuPage = MenuPage::Get(); MenuPage::MenuPage() : IPage(ePageID::Menu, "Window.MenuPage", true) { - Events::initGameEvent += [this]() + // This needs to run before initRwEvent + // Updates are checked in m_bAutoCheckUpdate + Events::initRwEvent.before += [this]() { m_bDiscordRPC = gConfig.Get("Menu.DiscordRPC", false); m_bAutoCheckUpdate = gConfig.Get("Menu.AutoCheckUpdate", true); diff --git a/src/utils/updater.cpp b/src/utils/updater.cpp index ba7af7a..4b294a1 100644 --- a/src/utils/updater.cpp +++ b/src/utils/updater.cpp @@ -52,9 +52,7 @@ void Updater::Process() sscanf(buf, "[{\"name\": \"%f\",", &version); if (version != 0.0f) { - std::stringstream ss; - ss << std::fixed << std::setprecision(2) << version; - latestVer = ss.str(); + latestVer = std::format("{}", version); break; } }