Merge pull request #782 from diamante0018/develop
[Dvar]: Increase max value of dvar
This commit is contained in:
commit
7a9d6d6259
@ -250,6 +250,11 @@ namespace Components
|
|||||||
return Game::Dvar_RegisterInt(dvarName, 1000, min, 1000, Game::DVAR_NONE, description);
|
return Game::Dvar_RegisterInt(dvarName, 1000, min, 1000, Game::DVAR_NONE, description);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const Game::dvar_t* Dvar::Dvar_RegisterPerkExtendedMeleeRange(const char* dvarName, float value, float min, float /*max*/, std::uint16_t flags, const char* description)
|
||||||
|
{
|
||||||
|
return Game::Dvar_RegisterFloat(dvarName, value, min, 10000.0f, flags, description);
|
||||||
|
}
|
||||||
|
|
||||||
void Dvar::SetFromStringByNameSafeExternal(const char* dvarName, const char* string)
|
void Dvar::SetFromStringByNameSafeExternal(const char* dvarName, const char* string)
|
||||||
{
|
{
|
||||||
static std::array<const char*, 8> exceptions =
|
static std::array<const char*, 8> exceptions =
|
||||||
@ -415,6 +420,9 @@ namespace Components
|
|||||||
// Hook dvar 'sv_network_fps' registration
|
// Hook dvar 'sv_network_fps' registration
|
||||||
Utils::Hook(0x4D3C7B, Dvar_RegisterSVNetworkFps, HOOK_CALL).install()->quick();
|
Utils::Hook(0x4D3C7B, Dvar_RegisterSVNetworkFps, HOOK_CALL).install()->quick();
|
||||||
|
|
||||||
|
// Hook dvar 'perk_extendedMeleeRange' and set a higher max, better than having people force this with external programs
|
||||||
|
Utils::Hook(0x492D2F, Dvar_RegisterPerkExtendedMeleeRange, HOOK_CALL).install()->quick();
|
||||||
|
|
||||||
// un-cheat safeArea_* and add archive flags
|
// un-cheat safeArea_* and add archive flags
|
||||||
Utils::Hook::Xor<std::uint32_t>(0x42E3F5, Game::DVAR_ROM | Game::DVAR_ARCHIVE); //safeArea_adjusted_horizontal
|
Utils::Hook::Xor<std::uint32_t>(0x42E3F5, Game::DVAR_ROM | Game::DVAR_ARCHIVE); //safeArea_adjusted_horizontal
|
||||||
Utils::Hook::Xor<std::uint32_t>(0x42E423, Game::DVAR_ROM | Game::DVAR_ARCHIVE); //safeArea_adjusted_vertical
|
Utils::Hook::Xor<std::uint32_t>(0x42E423, Game::DVAR_ROM | Game::DVAR_ARCHIVE); //safeArea_adjusted_vertical
|
||||||
|
@ -42,6 +42,7 @@ namespace Components
|
|||||||
|
|
||||||
static const Game::dvar_t* Dvar_RegisterName(const char* dvarName, const char* value, std::uint16_t flags, const char* description);
|
static const Game::dvar_t* Dvar_RegisterName(const char* dvarName, const char* value, std::uint16_t flags, const char* description);
|
||||||
static const Game::dvar_t* Dvar_RegisterSVNetworkFps(const char* dvarName, int value, int min, int max, std::uint16_t flags, const char* description);
|
static const Game::dvar_t* Dvar_RegisterSVNetworkFps(const char* dvarName, int value, int min, int max, std::uint16_t flags, const char* description);
|
||||||
|
static const Game::dvar_t* Dvar_RegisterPerkExtendedMeleeRange(const char* dvarName, float value, float min, float max, std::uint16_t flags, const char* description);
|
||||||
|
|
||||||
static void SetFromStringByNameExternal(const char* dvarName, const char* string);
|
static void SetFromStringByNameExternal(const char* dvarName, const char* string);
|
||||||
static void SetFromStringByNameSafeExternal(const char* dvarName, const char* string);
|
static void SetFromStringByNameSafeExternal(const char* dvarName, const char* string);
|
||||||
|
Loading…
Reference in New Issue
Block a user