Use call_safe method instead

This commit is contained in:
BrentVL-1952840 2023-03-20 21:38:15 +01:00
parent a04e9ade85
commit ab10d3641f
2 changed files with 2 additions and 8 deletions

View File

@ -66,12 +66,6 @@ namespace dvars_patches
// toggle ADS dof based on r_dof_enable // toggle ADS dof based on r_dof_enable
utils::hook::jump(0x141116EBB_g, utils::hook::assemble(dof_enabled_stub)); utils::hook::jump(0x141116EBB_g, utils::hook::assemble(dof_enabled_stub));
// De-Arxan Dvar_SessionModeSetDefaultBool
utils::hook::nop(0x1422D0EDB_g, 9);
utils::hook::jump(0x1422D0EE6_g, 0x1422D11BA_g);
utils::hook::jump(0x1422D11D1_g, 0x1422D11EC_g);
utils::hook::jump(0x1422D11F1_g, 0x1422D142C_g);
} }
}; };
} }

View File

@ -51,12 +51,12 @@ namespace game
{ {
for (int i = MODE_FIRST; i < MODE_COUNT; ++i) for (int i = MODE_FIRST; i < MODE_COUNT; ++i)
{ {
game::Dvar_SessionModeSetDefaultBool(hash, value, static_cast<eModes>(i)); game::Dvar_SessionModeSetDefaultBool.call_safe(hash, value, static_cast<eModes>(i));
} }
} }
else else
{ {
game::Dvar_SessionModeSetDefaultBool(hash, value, mode); game::Dvar_SessionModeSetDefaultBool.call_safe(hash, value, mode);
} }
} }