fix(Globals): Startup problem cause by settings

This commit is contained in:
Yimura 2021-05-19 18:36:33 +02:00
parent 139bcbfd47
commit 091dd429d5

View File

@ -1,24 +1,11 @@
#pragma once
#include "enums.hpp"
#include "settings.h"
#ifndef GLOBALS_H
#define GLOBALS_H
using namespace big;
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 {
bool godmode = false;
bool noclip = false;
@ -32,11 +19,6 @@ struct globals {
CustomWeapon custom_weapon = CustomWeapon::NONE;
};
globals()
{
this->load();
}
self self{};
vehicle vehicle{};
weapons weapons{};