From c150899f20b072bc87d249a60b210d3d3e236c33 Mon Sep 17 00:00:00 2001 From: Grinch_ Date: Sat, 31 Dec 2022 02:29:55 +0600 Subject: [PATCH] [III] Fix crash with vehicle spawning #69 --- src/defines.h | 4 ++-- src/pages/menu.cpp | 2 ++ src/pages/vehicle.cpp | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/defines.h b/src/defines.h index 90e23ca..6249395 100644 --- a/src/defines.h +++ b/src/defines.h @@ -8,8 +8,8 @@ #define IMGUI_DEFINE_MATH_OPERATORS #define MENU_NAME "Cheat Menu" -#define MENU_VERSION_NUMBER "3.3" -#define MENU_VERSION MENU_VERSION_NUMBER"-beta" +#define MENU_VERSION_NUMBER "3.5" +#define MENU_VERSION MENU_VERSION_NUMBER #define MENU_TITLE MENU_NAME " v" MENU_VERSION #ifdef GTASA diff --git a/src/pages/menu.cpp b/src/pages/menu.cpp index 8fc1d19..2f271bd 100644 --- a/src/pages/menu.cpp +++ b/src/pages/menu.cpp @@ -166,10 +166,12 @@ void MenuPage::Draw() gConfig.Set("Overlay.ShowLocationName", Overlay::m_bLocName); } +#ifndef GTA3 if (ImGui::Checkbox(TEXT("Menu.ShowModelInfo"), &Overlay::m_bModelInfo)) { gConfig.Set("Overlay.ShowModelInfo", Overlay::m_bModelInfo); } +#endif ImGui::NextColumn(); diff --git a/src/pages/vehicle.cpp b/src/pages/vehicle.cpp index 86e2969..f652243 100644 --- a/src/pages/vehicle.cpp +++ b/src/pages/vehicle.cpp @@ -451,7 +451,9 @@ void VehiclePage::SpawnVehicle(std::string& rootkey, std::string& vehName, std:: player->GetOrientation(x, y, z); veh->SetOrientation(x, y, z); #endif + CWorld::Remove(player); Command(hplayer, hveh); + CWorld::Add(player); Util::SetCarForwardSpeed(veh, speed); } else