feat(Core): Added speedo_meter to data and renamed CustomWeapon enum
This commit is contained in:
parent
f070caf23d
commit
d6072b26b6
@ -17,7 +17,7 @@ namespace big
|
|||||||
|
|
||||||
void looped::weapons_gravity_gun()
|
void looped::weapons_gravity_gun()
|
||||||
{
|
{
|
||||||
bool bGravityGun = g.weapons.custom_weapon == CustomWeapons::GRAVITY_GUN;
|
bool bGravityGun = g.weapons.custom_weapon == CustomWeapon::GRAVITY_GUN;
|
||||||
double multiplier = 3.0;
|
double multiplier = 3.0;
|
||||||
|
|
||||||
if (bGravityGun)
|
if (bGravityGun)
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
#include "core/enums.hpp"
|
#include "core/enums.hpp"
|
||||||
|
|
||||||
struct custom_weapon {
|
struct custom_weapon {
|
||||||
big::CustomWeapons id;
|
big::CustomWeapon id;
|
||||||
const char name[16];
|
const char name[16];
|
||||||
};
|
};
|
||||||
|
|
||||||
const custom_weapon custom_weapons[] = {
|
const custom_weapon custom_weapons[] = {
|
||||||
{ big::CustomWeapons::NONE, "No weapon" },
|
{ big::CustomWeapon::NONE, "No weapon" },
|
||||||
{ big::CustomWeapons::GRAVITY_GUN, "Gravity Gun" }
|
{ big::CustomWeapon::GRAVITY_GUN, "Gravity Gun" }
|
||||||
};
|
};
|
13
BigBaseV2/src/core/data/speedo_meters.hpp
Normal file
13
BigBaseV2/src/core/data/speedo_meters.hpp
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "core/enums.hpp"
|
||||||
|
|
||||||
|
struct speedo_meter {
|
||||||
|
big::SpeedoMeter id;
|
||||||
|
const char name[16];
|
||||||
|
};
|
||||||
|
|
||||||
|
const speedo_meter speedo_meters[] = {
|
||||||
|
{ big::SpeedoMeter::DISABLED, "Disabled" },
|
||||||
|
{ big::SpeedoMeter::KMH, "km/h" },
|
||||||
|
{ big::SpeedoMeter::MPH, "mph" }
|
||||||
|
};
|
@ -2,9 +2,16 @@
|
|||||||
|
|
||||||
namespace big
|
namespace big
|
||||||
{
|
{
|
||||||
enum class CustomWeapons
|
enum class CustomWeapon
|
||||||
{
|
{
|
||||||
NONE,
|
NONE,
|
||||||
GRAVITY_GUN
|
GRAVITY_GUN
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum class SpeedoMeter
|
||||||
|
{
|
||||||
|
DISABLED,
|
||||||
|
KMH,
|
||||||
|
MPH
|
||||||
|
};
|
||||||
}
|
}
|
@ -1,19 +1,44 @@
|
|||||||
#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;
|
||||||
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 noclip = false;
|
bool noclip = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct weapons {
|
struct vehicle {
|
||||||
big::CustomWeapons custom_weapon = big::CustomWeapons::NONE;
|
SpeedoMeter speedo_meter = SpeedoMeter::DISABLED;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct weapons {
|
||||||
|
CustomWeapon custom_weapon = CustomWeapon::NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
globals()
|
||||||
|
{
|
||||||
|
this->load();
|
||||||
|
}
|
||||||
|
|
||||||
self self{};
|
self self{};
|
||||||
|
vehicle vehicle{};
|
||||||
weapons weapons{};
|
weapons weapons{};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user