mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-23 01:02:23 +08:00
fix(Globals): Startup problem cause by settings
This commit is contained in:
@ -1,24 +1,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "enums.hpp"
|
#include "enums.hpp"
|
||||||
#include "settings.h"
|
|
||||||
|
|
||||||
#ifndef GLOBALS_H
|
#ifndef GLOBALS_H
|
||||||
#define GLOBALS_H
|
#define GLOBALS_H
|
||||||
|
|
||||||
using namespace big;
|
using namespace big;
|
||||||
struct globals {
|
struct globals {
|
||||||
void load()
|
|
||||||
{
|
|
||||||
this->self.noclip = g_settings.options["self"]["godmode"];
|
|
||||||
}
|
|
||||||
|
|
||||||
void save()
|
|
||||||
{
|
|
||||||
g_settings.options["self"]["godmode"] = this->self.noclip;
|
|
||||||
|
|
||||||
g_settings.save();
|
|
||||||
}
|
|
||||||
|
|
||||||
struct self {
|
struct self {
|
||||||
bool godmode = false;
|
bool godmode = false;
|
||||||
bool noclip = false;
|
bool noclip = false;
|
||||||
@ -32,11 +19,6 @@ struct globals {
|
|||||||
CustomWeapon custom_weapon = CustomWeapon::NONE;
|
CustomWeapon custom_weapon = CustomWeapon::NONE;
|
||||||
};
|
};
|
||||||
|
|
||||||
globals()
|
|
||||||
{
|
|
||||||
this->load();
|
|
||||||
}
|
|
||||||
|
|
||||||
self self{};
|
self self{};
|
||||||
vehicle vehicle{};
|
vehicle vehicle{};
|
||||||
weapons weapons{};
|
weapons weapons{};
|
||||||
|
Reference in New Issue
Block a user