Fix crosshair

This commit is contained in:
Federico Cecchetto 2022-05-31 23:23:07 +02:00
parent cfd5472a09
commit 9fc9c662e3

View File

@ -164,6 +164,11 @@ namespace patches
init_network_dvars_hook.invoke<void>(dvar); init_network_dvars_hook.invoke<void>(dvar);
} }
} }
int ui_draw_crosshair()
{
return 1;
}
} }
class component final : public component_interface class component final : public component_interface
@ -272,6 +277,7 @@ namespace patches
dvars::register_int("scr_game_spectatetype", 1, 0, 99, game::DVAR_FLAG_REPLICATED, ""); dvars::register_int("scr_game_spectatetype", 1, 0, 99, game::DVAR_FLAG_REPLICATED, "");
dvars::override::register_bool("ui_drawCrosshair", true, game::DVAR_FLAG_WRITE); dvars::override::register_bool("ui_drawCrosshair", true, game::DVAR_FLAG_WRITE);
utils::hook::jump(0x1E6010_b, ui_draw_crosshair);
dvars::override::register_int("com_maxfps", 0, 0, 1000, game::DVAR_FLAG_SAVED); dvars::override::register_int("com_maxfps", 0, 0, 1000, game::DVAR_FLAG_SAVED);