parent
c5601ccb0b
commit
a95598a95c
@ -7,7 +7,7 @@
|
|||||||
#include "version.hpp"
|
#include "version.hpp"
|
||||||
|
|
||||||
#include "game/game.hpp"
|
#include "game/game.hpp"
|
||||||
#include "game/dvars.hpp"
|
#include "dvars.hpp"
|
||||||
|
|
||||||
#include <utils/hook.hpp>
|
#include <utils/hook.hpp>
|
||||||
#include <utils/string.hpp>
|
#include <utils/string.hpp>
|
||||||
@ -18,7 +18,6 @@ namespace branding
|
|||||||
{
|
{
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
game::dvar_t* cg_showversion;
|
|
||||||
utils::hook::detour ui_get_formatted_build_number_hook;
|
utils::hook::detour ui_get_formatted_build_number_hook;
|
||||||
|
|
||||||
float color[4] = {0.666f, 0.666f, 0.666f, 0.666f};
|
float color[4] = {0.666f, 0.666f, 0.666f, 0.666f};
|
||||||
@ -32,7 +31,7 @@ namespace branding
|
|||||||
void draw_branding()
|
void draw_branding()
|
||||||
{
|
{
|
||||||
const auto font = game::R_RegisterFont("fonts/fira_mono_bold.ttf", 20);
|
const auto font = game::R_RegisterFont("fonts/fira_mono_bold.ttf", 20);
|
||||||
if (font && cg_showversion->current.enabled)
|
if (font)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
game::R_AddCmdDrawText("H1-Mod: " VERSION " (" __DATE__ " " __TIME__ ")", 0x7FFFFFFF, font, 10.f,
|
game::R_AddCmdDrawText("H1-Mod: " VERSION " (" __DATE__ " " __TIME__ ")", 0x7FFFFFFF, font, 10.f,
|
||||||
@ -66,8 +65,6 @@ namespace branding
|
|||||||
localized_strings::override("MENU_MULTIPLAYER_CAPS", "H1-MOD: MULTIPLAYER");
|
localized_strings::override("MENU_MULTIPLAYER_CAPS", "H1-MOD: MULTIPLAYER");
|
||||||
}
|
}
|
||||||
|
|
||||||
cg_showversion = dvars::register_bool("cg_showversion", true, game::DvarFlags::DVAR_FLAG_SAVED, "Show/Hide H1-Mod Branding");
|
|
||||||
|
|
||||||
ui_get_formatted_build_number_hook.create(
|
ui_get_formatted_build_number_hook.create(
|
||||||
SELECT_VALUE(0x406EC0_b, 0x1DF300_b), ui_get_formatted_build_number_stub);
|
SELECT_VALUE(0x406EC0_b, 0x1DF300_b), ui_get_formatted_build_number_stub);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user