diff --git a/src/client/component/gameplay.cpp b/src/client/component/gameplay.cpp index 22f22f30..ffcf30f4 100644 --- a/src/client/component/gameplay.cpp +++ b/src/client/component/gameplay.cpp @@ -51,11 +51,11 @@ namespace gameplay }); } - void* bg_gravity_stub() + void* g_gravity_stub() { return utils::hook::assemble([](utils::hook::assembler& a) { - a.mov(rax, qword_ptr(reinterpret_cast(&dvars::bg_gravity))); + a.mov(rax, qword_ptr(reinterpret_cast(&dvars::g_gravity))); a.mov(eax, dword_ptr(rax, 0x10)); a.mov(dword_ptr(rdi, 0x78), eax); @@ -77,9 +77,9 @@ namespace gameplay utils::hook::jump(0x70FBB7_b, bg_bounces_stub(), true); // Implement gravity dvar - dvars::bg_gravity = game::Dvar_RegisterInt("bg_gravity", 800, 0, 1000, game::DVAR_FLAG_REPLICATED, "Game gravity in inches per second squared"); + dvars::g_gravity = game::Dvar_RegisterInt("g_gravity", 800, 0, 1000, game::DVAR_FLAG_REPLICATED, "Game gravity in inches per second squared"); utils::hook::nop(0xAFA330_b, 13); - utils::hook::jump(0xAFA330_b, bg_gravity_stub(), true); + utils::hook::jump(0xAFA330_b, g_gravity_stub(), true); dvars::g_playerEjection = game::Dvar_RegisterBool("g_playerEjection", true, game::DVAR_FLAG_REPLICATED, "Flag whether player ejection is on or off"); stuck_in_client_hook.create(0xAFD9B0_b, stuck_in_client_stub); diff --git a/src/client/game/dvars.cpp b/src/client/game/dvars.cpp index d4ba436a..b4f69635 100644 --- a/src/client/game/dvars.cpp +++ b/src/client/game/dvars.cpp @@ -26,7 +26,7 @@ namespace dvars game::dvar_t* r_fullbright = nullptr; game::dvar_t* bg_bounces = nullptr; - game::dvar_t* bg_gravity = nullptr; + game::dvar_t* g_gravity = nullptr; game::dvar_t* g_playerEjection = nullptr; diff --git a/src/client/game/dvars.hpp b/src/client/game/dvars.hpp index dfce1b8f..adb4344b 100644 --- a/src/client/game/dvars.hpp +++ b/src/client/game/dvars.hpp @@ -22,7 +22,7 @@ namespace dvars extern game::dvar_t* r_fullbright; extern game::dvar_t* bg_bounces; - extern game::dvar_t* bg_gravity; + extern game::dvar_t* g_gravity; extern game::dvar_t* g_playerEjection;