mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Light cleanup of the detours init system
This commit is contained in:
parent
de6aab7252
commit
feef90c44f
@ -127,14 +127,9 @@ void Systems_Init()
|
||||
QuerySystemInfo();
|
||||
|
||||
CFastTimer initTimer;
|
||||
initTimer.Start();
|
||||
|
||||
for (IDetour* pDetour : vDetour)
|
||||
{
|
||||
pDetour->GetCon();
|
||||
pDetour->GetFun();
|
||||
pDetour->GetVar();
|
||||
}
|
||||
initTimer.Start();
|
||||
DetourInit();
|
||||
initTimer.End();
|
||||
|
||||
spdlog::info("+-------------------------------------------------------------+\n");
|
||||
@ -427,10 +422,19 @@ void QuerySystemInfo()
|
||||
}
|
||||
}
|
||||
|
||||
void PrintHAddress() // Test the sigscan results
|
||||
void DetourInit() // Run the sigscan
|
||||
{
|
||||
for (const IDetour* pDetour : vDetour)
|
||||
{
|
||||
pDetour->GetCon(); // Constants.
|
||||
pDetour->GetFun(); // Functions.
|
||||
pDetour->GetVar(); // Variables.
|
||||
}
|
||||
}
|
||||
void DetourAddress() // Test the sigscan results
|
||||
{
|
||||
spdlog::debug("+----------------------------------------------------------------+\n");
|
||||
for (IDetour* pDetour : vDetour)
|
||||
for (const IDetour* pDetour : vDetour)
|
||||
{
|
||||
pDetour->GetAdr();
|
||||
}
|
||||
|
@ -14,4 +14,6 @@ void Systems_Shutdown();
|
||||
void WS_Init();
|
||||
void WS_Shutdown();
|
||||
void QuerySystemInfo();
|
||||
void PrintHAddress();
|
||||
|
||||
void DetourInit();
|
||||
void DetourAddress();
|
||||
|
@ -131,9 +131,9 @@ DWORD __stdcall ProcessConsoleWorker(LPVOID)
|
||||
std::getline(std::cin, sCommand);
|
||||
|
||||
//-- Debug toggles
|
||||
if (sCommand == "pattern test") { PrintHAddress(); continue; }
|
||||
if (sCommand == "sig_getadr") { DetourAddress(); continue; }
|
||||
|
||||
// Execute the command in the r5 SQVM
|
||||
// Execute the command.
|
||||
Cbuf_AddText(Cbuf_GetCurrentPlayer(), sCommand.c_str(), cmd_source_t::kCommandSrcCode);
|
||||
Cbuf_Execute();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user