mirror of
https://github.com/alicealys/t5-gsc-utils.git
synced 2025-04-19 20:42:54 +00:00
Set filesystem current path to fs_basegame
This commit is contained in:
parent
8c0d999a2a
commit
38897d308d
@ -15,6 +15,9 @@ namespace io
|
||||
public:
|
||||
void post_unpack() override
|
||||
{
|
||||
const auto fs_basegame = game::Dvar_FindVar("fs_basegame");
|
||||
std::filesystem::current_path(fs_basegame->current.string);
|
||||
|
||||
gsc::function::add_multiple([](const std::string& file, const std::string& data,
|
||||
const scripting::variadic_args& va)
|
||||
{
|
||||
|
@ -492,12 +492,19 @@ namespace game
|
||||
float max;
|
||||
};
|
||||
|
||||
struct DvarLimits_integer64
|
||||
{
|
||||
__int64 min;
|
||||
__int64 max;
|
||||
};
|
||||
|
||||
union DvarLimits
|
||||
{
|
||||
$A37BA207B3DDD6345C554D4661813EDD enumeration;
|
||||
$9CA192F9DB66A3CB7E01DE78A0DEA53D integer;
|
||||
$251C2428A496074035CACA7AAF3D55BD value;
|
||||
$251C2428A496074035CACA7AAF3D55BD vector;
|
||||
DvarLimits_integer64 integer64;
|
||||
};
|
||||
|
||||
struct dvar_t
|
||||
@ -508,13 +515,18 @@ namespace game
|
||||
unsigned int flags;
|
||||
dvarType_t type;
|
||||
bool modified;
|
||||
bool loadedFromSaveGame;
|
||||
DvarValue current;
|
||||
DvarValue latched;
|
||||
DvarValue saved;
|
||||
DvarValue reset;
|
||||
DvarLimits domain;
|
||||
dvar_t* hashNext;
|
||||
};
|
||||
|
||||
static_assert(offsetof(dvar_t, hashNext) == 104);
|
||||
static_assert(offsetof(dvar_t, current) == 24);
|
||||
|
||||
struct GSC_OBJ
|
||||
{
|
||||
char magic[8];
|
||||
|
@ -19,7 +19,7 @@ namespace game
|
||||
|
||||
WEAK symbol<int(const char* fmt, ...)> Com_Printf{0x566BC0, 0x64C260};
|
||||
|
||||
WEAK symbol<const dvar_t*(const char*)> Dvar_FindVar{0x0, 0x0};
|
||||
WEAK symbol<const dvar_t*(const char*)> Dvar_FindVar{0x5AE810, 0x512F70};
|
||||
WEAK symbol<int(const dvar_t*)> Dvar_GetInt{0x0, 0x0};
|
||||
WEAK symbol<dvar_t*(const char* dvarName, int value, int min, int max,
|
||||
unsigned int flags, const char* description)> Dvar_RegisterInt{0x0, 0x0};
|
||||
|
Loading…
x
Reference in New Issue
Block a user