Change console window title to server name
This commit is contained in:
parent
09a60ffba4
commit
38f4387c52
@ -3,6 +3,7 @@
|
||||
#include "resource.hpp"
|
||||
|
||||
#include "game/game.hpp"
|
||||
#include "scheduler.hpp"
|
||||
|
||||
#include <utils/thread.hpp>
|
||||
#include <utils/hook.hpp>
|
||||
@ -204,6 +205,14 @@ namespace console
|
||||
{
|
||||
utils::hook::set<uint8_t>(0x14133D2FE_g, 0xEB); // Always enable ingame console
|
||||
}
|
||||
else
|
||||
{
|
||||
scheduler::once([]()
|
||||
{
|
||||
const auto server_name = game::Dvar_FindVar("live_steam_server_name")->current.string;
|
||||
SetWindowTextA(*game::s_wcd::hWnd, server_name);
|
||||
}, scheduler::pipeline::main);
|
||||
}
|
||||
|
||||
utils::hook::jump(game::select(0x1423337F0, 0x1405976B0), queue_message);
|
||||
utils::hook::nop(game::select(0x14233380A, 0x1405976CA), 2); // Print from every thread
|
||||
|
Loading…
Reference in New Issue
Block a user