From c49cb35cfcb3b987291831b46100fb883c90a6bc Mon Sep 17 00:00:00 2001 From: Yimura Date: Sun, 13 Feb 2022 23:52:33 +0100 Subject: [PATCH] fix(Globals): Assign to correct settings and don't int cast --- BigBaseV2/src/core/globals.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/BigBaseV2/src/core/globals.hpp b/BigBaseV2/src/core/globals.hpp index 5448854e..247cf691 100644 --- a/BigBaseV2/src/core/globals.hpp +++ b/BigBaseV2/src/core/globals.hpp @@ -116,8 +116,8 @@ struct globals { struct weapons { CustomWeapon custom_weapon = CustomWeapon::NONE; char vehicle_gun_model[12] = "bus"; - bool infinite_ammo {}; - bool infinite_mag {}; + bool infinite_ammo = false; + bool infinite_mag = false; }; struct window { @@ -205,8 +205,8 @@ struct globals { this->vehicle.speedo_meter.y = j["vehicle"]["speedo_meter"]["position_y"]; this->weapons.custom_weapon = (CustomWeapon)j["weapons"]["custom_weapon"]; - this->weapons.custom_weapon = j["weapons"]["infinite_ammo"]; - this->weapons.custom_weapon = j["weapons"]["infinite_mag"]; + this->weapons.infinite_ammo = j["weapons"]["infinite_ammo"]; + this->weapons.infinite_mag = j["weapons"]["infinite_mag"]; this->window.debug = j["window"]["debug"]; this->window.handling = j["window"]["handling"]; @@ -317,8 +317,8 @@ struct globals { { "weapons", { { "custom_weapon", (int)this->weapons.custom_weapon }, - { "infinite_ammo", (int)this->weapons.infinite_ammo }, - { "infinite_mag", (int)this->weapons.infinite_mag } + { "infinite_ammo", this->weapons.infinite_ammo }, + { "infinite_mag", this->weapons.infinite_mag } } }, {