Make game boot for now
This commit is contained in:
parent
74ed1c342a
commit
8538de0f96
@ -310,9 +310,9 @@ namespace Components
|
||||
Utils::Hook::Call<void(const char*, const char*)>(0x4F52E0)(dvarName, value);
|
||||
}
|
||||
|
||||
void Dvar::Com_InitDvars_Hk()
|
||||
void Dvar::CL_InitOnceForAllClients_Hk()
|
||||
{
|
||||
Utils::Hook::Call<void()>(0x60AD10)();
|
||||
Utils::Hook::Call<void()>(0x404CA0)();
|
||||
Dvar::RegistrationSignal();
|
||||
}
|
||||
|
||||
@ -363,7 +363,7 @@ namespace Components
|
||||
Utils::Hook::Xor<BYTE>(0x42E398, Game::dvar_flag::DVAR_CHEAT | Game::dvar_flag::DVAR_ARCHIVE); //safeArea_horizontal
|
||||
Utils::Hook::Xor<BYTE>(0x42E3C4, Game::dvar_flag::DVAR_CHEAT | Game::dvar_flag::DVAR_ARCHIVE); //safeArea_vertical
|
||||
|
||||
Utils::Hook(0x60BB3A, Dvar::Com_InitDvars_Hk, HOOK_CALL).install()->quick();
|
||||
Utils::Hook(0x60BE5B, Dvar::CL_InitOnceForAllClients_Hk, HOOK_CALL).install()->quick();
|
||||
|
||||
// Don't allow setting cheat protected dvars via menus
|
||||
Utils::Hook(0x63C897, Dvar::SetFromStringByNameExternal, HOOK_CALL).install()->quick();
|
||||
|
@ -65,7 +65,6 @@ namespace Components
|
||||
static void SaveArchiveDvar(const Game::dvar_t* var);
|
||||
static void DvarSetFromStringByNameStub(const char* dvarName, const char* value);
|
||||
|
||||
// Unable to do any earlier because SL system will not be active for string dvars
|
||||
static void Com_InitDvars_Hk();
|
||||
static void CL_InitOnceForAllClients_Hk();
|
||||
};
|
||||
}
|
||||
|
@ -574,7 +574,7 @@ namespace Components
|
||||
if (FastFiles::Current().empty() || !Dvar::Var("ui_zoneDebug").get<bool>()) return;
|
||||
|
||||
auto* const font = Game::R_RegisterFont("fonts/consoleFont", 0);
|
||||
float color[4] = { 1.0f, 1.0f, 1.0f, (Game::CL_IsCgameInitialized() ? 0.3f : 1.0f) };
|
||||
float color[4] = {1.0f, 1.0f, 1.0f, (Game::CL_IsCgameInitialized() ? 0.3f : 1.0f)};
|
||||
|
||||
auto FFTotalSize = *reinterpret_cast<std::uint32_t*>(0x10AA5D8);
|
||||
auto FFCurrentOffset = *reinterpret_cast<std::uint32_t*>(0x10AA608);
|
||||
|
@ -714,7 +714,7 @@ namespace Components
|
||||
}
|
||||
});
|
||||
|
||||
Scheduler::Once([]()
|
||||
Scheduler::OnGameInitialized([]
|
||||
{
|
||||
if (Steam::Proxy::SteamFriends)
|
||||
{
|
||||
|
@ -342,7 +342,7 @@ namespace Components
|
||||
Scheduler::Loop([]
|
||||
{
|
||||
Node::StoreNodes(false);
|
||||
});
|
||||
}, Scheduler::Pipeline::MAIN);
|
||||
|
||||
Scheduler::Loop(Node::RunFrame, Scheduler::Pipeline::MAIN);
|
||||
|
||||
@ -360,11 +360,11 @@ namespace Components
|
||||
};
|
||||
|
||||
if (Monitor::IsEnabled()) Network::OnStart(loadNodes);
|
||||
else Dvar::OnInit(loadNodes);
|
||||
else Scheduler::OnGameInitialized(loadNodes, Scheduler::Pipeline::MAIN);
|
||||
|
||||
Network::OnStart([]()
|
||||
Network::OnStart([]
|
||||
{
|
||||
std::thread([]()
|
||||
std::thread([]
|
||||
{
|
||||
Node::LoadNodeRemotePreset();
|
||||
}).detach();
|
||||
|
@ -150,10 +150,12 @@ namespace Components
|
||||
|
||||
Scheduler::OnGameInitialized(Toast::Handler, Scheduler::Pipeline::RENDERER);
|
||||
|
||||
#ifdef _DEBUG
|
||||
Command::Add("testtoast", [](Command::Params*)
|
||||
{
|
||||
Toast::Show("cardicon_prestige10", "Test", "This is a test toast", 3000);
|
||||
});
|
||||
#endif
|
||||
}
|
||||
|
||||
Toast::~Toast()
|
||||
|
Loading…
Reference in New Issue
Block a user