Bug fixes

1. Fixed more issues with modloader
2. Fixed player model being broken after going through enex 3. Fixed cop caps being spawned locked
4. Fixed stuff in Visuals/Menu not working
This commit is contained in:
Grinch_ 2020-12-27 01:40:02 +06:00
parent ba1ec194d3
commit bc754af853
8 changed files with 19 additions and 17 deletions

View File

@ -389,8 +389,9 @@ void Menu::Main()
ImGui::Columns(1);
ImGui::Dummy(ImVec2(0, 10));
ImGui::TextWrapped("Thanks to,");
ImGui::TextWrapped("Junior-Djjr");
ImGui::TextWrapped("If you find bugs or have suggestions, let me know on discord.");
ImGui::Dummy(ImVec2(0, 10));
ImGui::TextWrapped("Thanks to Junior-Djjr");
ImGui::Dummy(ImVec2(0, 10));
ImGui::TextWrapped("Copyright GPLv3 2019-2021 Grinch_");

View File

@ -1,8 +1,6 @@
#include "pch.h"
#include "NeonAPI.h"
bool NeonAPI::api_installed = false;
HMODULE NeonAPI::hapi = false;
VehicleExtendedData<NeonAPI::NeonData> NeonAPI::VehNeon;
RwTexture* NeonAPI::neon_texture = nullptr;

View File

@ -3,8 +3,6 @@
class NeonAPI
{
private:
static bool api_installed;
static HMODULE hapi;
static RwTexture* neon_texture;
class NeonData {

View File

@ -12,9 +12,7 @@ Paint::Paint()
Events::initGameEvent += []
{
std::string dir_path = std::string(".\\CheatMenu\\vehicles\\paintjobs\\").c_str();
for (auto &p : fs::recursive_directory_iterator(dir_path))
for (auto &p : fs::recursive_directory_iterator(PLUGIN_PATH((char*)"\\CheatMenu\\vehicles\\paintjobs\\")))
{
if (p.path().extension() == ".png")
{

View File

@ -25,6 +25,13 @@ Player::Player()
{
Events::initGameEvent += []
{
/*
Nop call to CClothes::RebuildPlayerIfNeeded
So player model doesn't get fked
This probably gonna fuck me up in future but oh well
*/
patch::Nop(0x44070A,5,false);
aim_skin_changer = config.GetValue("aim_skin_changer", false);
Util::LoadTexturesInDirRecursive(PLUGIN_PATH((char*)"CheatMenu\\clothes\\"), ".jpg", search_categories, clothes_vec);
@ -190,7 +197,6 @@ void Player::Main()
ImGui::SameLine();
if (ImGui::Button("Suicide", ImVec2(Ui::GetSize(2))))
player->m_fHealth = 0.0;
ImGui::Spacing();
if (ImGui::BeginTabBar("Player", ImGuiTabBarFlags_NoTooltip + ImGuiTabBarFlags_FittingPolicyScroll))

View File

@ -678,10 +678,10 @@ void Ui::ColorPickerAddress(const char* label, int base_addr, ImVec4&& default_c
if (ImGui::Button("Reset to default", Ui::GetSize()))
{
patch::SetRaw(base_addr, &default_color.w, 1, false);
patch::SetRaw(base_addr + 1, &default_color.x, 1, false);
patch::SetRaw(base_addr + 2, &default_color.y, 1, false);
patch::SetRaw(base_addr + 3, &default_color.z, 1, false);
patch::Set<BYTE>(base_addr, default_color.x, false);
patch::Set<BYTE>(base_addr + 1, default_color.y, false);
patch::Set<BYTE>(base_addr + 2, default_color.z, false);
patch::Set<BYTE>(base_addr + 3, default_color.w, false);
}
ImGui::Spacing();

View File

@ -492,7 +492,7 @@ void Vehicle::SpawnVehicle(std::string &smodel)
int hveh = 0;
if (spawner::spawn_inside)
{
Command<Commands::CREATE_CAR>(imodel, pos.x, pos.y, pos.z + 4.0f, &hveh);
Command<Commands::CREATE_CAR>(imodel, pos.x, pos.y, pos.z + 2.0f, &hveh);
veh = CPools::GetVehicle(hveh);
veh->SetHeading(player->GetHeading());
Command<Commands::WARP_CHAR_INTO_CAR>(hplayer, hveh);
@ -502,10 +502,11 @@ void Vehicle::SpawnVehicle(std::string &smodel)
{
player->TransformFromObjectSpace(pos, CVector(0, 10, 0));
Command<Commands::CREATE_CAR>(imodel, pos.x, pos.y, pos.z + 4.0f, &hveh);
Command<Commands::CREATE_CAR>(imodel, pos.x, pos.y, pos.z + 2.0f, &hveh);
veh = CPools::GetVehicle(hveh);
veh->SetHeading(player->GetHeading()+55.0f);
}
veh->m_nDoorLock = CARLOCK_UNLOCKED;
veh->m_nAreaCode = interior;
Command<Commands::MARK_CAR_AS_NO_LONGER_NEEDED>(CPools::GetVehicleRef(veh));
CStreaming::SetModelIsDeletable(imodel);

View File

@ -4,7 +4,7 @@
#define INPUT_BUFFER_SIZE 64
#define SPAWN_PED_LIMIT 20
#define MENU_VERSION "2.5-beta"
#define BUILD_NUMBER "20201226"
#define BUILD_NUMBER "20201227"
#define STB_IMAGE_IMPLEMENTATION
#define DISCORD_INVITE "https://discord.gg/ZzW7kmf"
#define GITHUB_LINK "https://github.com/user-grinch/Cheat-Menu"