Use Dvar_SetString

This commit is contained in:
Diavolo 2021-08-31 18:12:25 +02:00
parent 1bb3b20395
commit ff5bb1f264
No known key found for this signature in database
GPG Key ID: FA77F074E98D98A5
3 changed files with 9 additions and 4 deletions

View File

@ -88,7 +88,7 @@ namespace Components
{
if (this->dvar && this->dvar->type == Game::dvar_type::DVAR_TYPE_STRING)
{
Game::Dvar_SetCommand(this->dvar->name, string);
Game::Dvar_SetString(this->dvar, string);
}
}
void Dvar::Var::set(const std::string& string)

View File

@ -279,6 +279,8 @@ namespace Game
Dvar_SetFromStringByName_t Dvar_SetFromStringByName = Dvar_SetFromStringByName_t(0x4F52E0);
Dvar_SetFromStringByNameFromSource_t Dvar_SetFromStringByNameFromSource = Dvar_SetFromStringByNameFromSource_t(0x4FC770);
Dvar_SetStringByName_t Dvar_SetStringByName = Dvar_SetStringByName_t(0x44F060);
Dvar_SetString_t Dvar_SetString = Dvar_SetString_t(0x4A9580);
SL_ConvertToString_t SL_ConvertToString = SL_ConvertToString_t(0x4EC1D0);
SL_GetString_t SL_GetString = SL_GetString_t(0x4CDC10);

View File

@ -244,6 +244,9 @@ namespace Game
typedef void (__cdecl * Dvar_SetStringByName_t)(const char* cvar, const char* value);
extern Dvar_SetStringByName_t Dvar_SetStringByName;
typedef void (__cdecl * Dvar_SetString_t)(dvar_t* cvar, const char* value);
extern Dvar_SetString_t Dvar_SetString;
typedef void(__cdecl * Dvar_GetUnpackedColorByName_t)(const char* name, float* color);
extern Dvar_GetUnpackedColorByName_t Dvar_GetUnpackedColorByName;