timescale implementation
This commit is contained in:
parent
954fde4013
commit
57828f61ec
@ -15,6 +15,7 @@ namespace gameplay
|
|||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
utils::hook::detour pm_weapon_use_ammo_hook;
|
utils::hook::detour pm_weapon_use_ammo_hook;
|
||||||
|
utils::hook::detour pm_player_trace_hook;
|
||||||
|
|
||||||
game::dvar_t* jump_slowDownEnable;
|
game::dvar_t* jump_slowDownEnable;
|
||||||
game::dvar_t* jump_enableFallDamage;
|
game::dvar_t* jump_enableFallDamage;
|
||||||
@ -132,6 +133,18 @@ namespace gameplay
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto* timescale = dvars::register_float("timescale", 1.0f, 0.1f, 50.0f, game::DVAR_FLAG_REPLICATED, "Changes Timescale of the game");
|
||||||
|
utils::hook::inject(0x1400D89A4, ×cale->current.value);
|
||||||
|
utils::hook::inject(0x1400DA9D1, ×cale->current.value);
|
||||||
|
utils::hook::inject(0x1400DB7A9, ×cale->current.value);
|
||||||
|
utils::hook::inject(0x1400DB7C6, ×cale->current.value);
|
||||||
|
utils::hook::inject(0x1400DB83C, ×cale->current.value);
|
||||||
|
utils::hook::inject(0x1400DB9CC, ×cale->current.value);
|
||||||
|
utils::hook::inject(0x1400DBAF0, ×cale->current.value);
|
||||||
|
utils::hook::inject(0x1400DBE72, ×cale->current.value);
|
||||||
|
utils::hook::inject(0x1400DBE9C, ×cale->current.value);
|
||||||
|
|
||||||
|
|
||||||
utils::hook::call(0x1401E8830, jump_apply_slowdown_stub);
|
utils::hook::call(0x1401E8830, jump_apply_slowdown_stub);
|
||||||
jump_slowDownEnable = dvars::register_bool("jump_slowDownEnable", true, game::DVAR_FLAG_REPLICATED, "Slow player movement after jumping");
|
jump_slowDownEnable = dvars::register_bool("jump_slowDownEnable", true, game::DVAR_FLAG_REPLICATED, "Slow player movement after jumping");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user