Merge remote-tracking branch 'origin/main' into feature/auth-protocol
# Conflicts: # src/client/game/utils.cpp
This commit is contained in:
commit
0738902f42
@ -111,7 +111,7 @@ namespace getinfo
|
|||||||
info.set("protocol", utils::string::va("%i", PROTOCOL));
|
info.set("protocol", utils::string::va("%i", PROTOCOL));
|
||||||
info.set("playmode", utils::string::va("%i", game::Com_SessionMode_GetMode()));
|
info.set("playmode", utils::string::va("%i", game::Com_SessionMode_GetMode()));
|
||||||
info.set("gamemode", utils::string::va("%i", Com_SessionMode_GetGameMode()));
|
info.set("gamemode", utils::string::va("%i", Com_SessionMode_GetGameMode()));
|
||||||
//info.set("sv_running", utils::string::va("%i", get_dvar_bool("sv_running")));
|
info.set("sv_running", utils::string::va("%i", game::get_dvar_bool("sv_running")));
|
||||||
info.set("dedicated", utils::string::va("%i", game::is_server() ? 1 : 0));
|
info.set("dedicated", utils::string::va("%i", game::is_server() ? 1 : 0));
|
||||||
info.set("shortversion", SHORTVERSION);
|
info.set("shortversion", SHORTVERSION);
|
||||||
|
|
||||||
|
@ -105,10 +105,15 @@ namespace game
|
|||||||
WEAK symbol<const char*(const dvar_t* dvar)> Dvar_DisplayableValue{0x1422BC080};
|
WEAK symbol<const char*(const dvar_t* dvar)> Dvar_DisplayableValue{0x1422BC080};
|
||||||
WEAK symbol<bool(const dvar_t* dvar)> Dvar_GetBool{0x1422BCED0};
|
WEAK symbol<bool(const dvar_t* dvar)> Dvar_GetBool{0x1422BCED0};
|
||||||
WEAK symbol<int(const dvar_t* dvar)> Dvar_GetInt{0x0, 0x140575C20};
|
WEAK symbol<int(const dvar_t* dvar)> Dvar_GetInt{0x0, 0x140575C20};
|
||||||
|
WEAK symbol<float(const dvar_t* dvar)> Dvar_GetFLoat{0x0, 0x140575B20};
|
||||||
WEAK symbol<dvar_t*(dvarStrHash_t hash, const char* dvarName, bool value, int flags,
|
WEAK symbol<dvar_t*(dvarStrHash_t hash, const char* dvarName, bool value, int flags,
|
||||||
const char* description)> Dvar_RegisterBool{
|
const char* description)> Dvar_RegisterBool{
|
||||||
0x1422D0900, 0x14057B500
|
0x1422D0900, 0x14057B500
|
||||||
};
|
};
|
||||||
|
WEAK symbol<dvar_t*(dvarStrHash_t hash, const char* dvarName, float value, float min, float max, unsigned int flags,
|
||||||
|
const char* description)> Dvar_RegisterFloat{
|
||||||
|
0x0, 0x14057B6B0
|
||||||
|
};
|
||||||
WEAK symbol<dvar_t*(dvarStrHash_t hash, const char* dvarName, bool value, int flags,
|
WEAK symbol<dvar_t*(dvarStrHash_t hash, const char* dvarName, bool value, int flags,
|
||||||
const char* description)> Dvar_SessionModeRegisterBool{
|
const char* description)> Dvar_SessionModeRegisterBool{
|
||||||
0x1422D0D40, 0x14057BAA0
|
0x1422D0D40, 0x14057BAA0
|
||||||
|
@ -84,6 +84,20 @@ namespace game
|
|||||||
return registered_dvar;
|
return registered_dvar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const dvar_t* register_dvar_float(const char* dvar_name, float value, float min, float max, const int flags,
|
||||||
|
const char* description)
|
||||||
|
{
|
||||||
|
const auto hash = Dvar_GenerateHash(dvar_name);
|
||||||
|
auto* registered_dvar = Dvar_RegisterFloat(hash, dvar_name, value, min, max, flags, description);
|
||||||
|
|
||||||
|
if (registered_dvar)
|
||||||
|
{
|
||||||
|
registered_dvar->debugName = dvar_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
return registered_dvar;
|
||||||
|
}
|
||||||
|
|
||||||
const dvar_t* register_dvar_string(const char* dvar_name, const char* value, const int flags,
|
const dvar_t* register_dvar_string(const char* dvar_name, const char* value, const int flags,
|
||||||
const char* description)
|
const char* description)
|
||||||
{
|
{
|
||||||
|
@ -9,6 +9,7 @@ namespace game
|
|||||||
bool get_dvar_bool(const char* dvar_name);
|
bool get_dvar_bool(const char* dvar_name);
|
||||||
|
|
||||||
const dvar_t* register_dvar_bool(const char* dvar_name, bool value, int flags, const char* description);
|
const dvar_t* register_dvar_bool(const char* dvar_name, bool value, int flags, const char* description);
|
||||||
|
const dvar_t* register_dvar_float(const char* dvar_name, float value, float min, float max, const int flags, const char* description);
|
||||||
const dvar_t* register_sessionmode_dvar_bool(const char* dvar_name, bool value, int flags, const char* description, eModes mode = MODE_COUNT);
|
const dvar_t* register_sessionmode_dvar_bool(const char* dvar_name, bool value, int flags, const char* description, eModes mode = MODE_COUNT);
|
||||||
const dvar_t* register_dvar_string(const char* dvar_name, const char* value, int flags, const char* description);
|
const dvar_t* register_dvar_string(const char* dvar_name, const char* value, int flags, const char* description);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user