mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Based on MrSteyk's dedicated patch. Additional patches targets the disabling of the client.dll library and VGUI. The disabling of the client.dll library initialization caused several issues to be investigated still (currently loops fine in _Host_RunFrame()). but executing a map command currently makes it only load the mp_common VPK before getting stuck somewhere. Setting hoststate to a valid map with HS_NEW_GAME (manually) does something to the engine but does not force the server to load anything yet. Added enums and classes from r5dev project.
51 lines
1.3 KiB
C++
51 lines
1.3 KiB
C++
#include "pch.h"
|
|
#include "dllmain.h"
|
|
#include "hooks.h"
|
|
#include "console.h"
|
|
|
|
//#############################################################################
|
|
// INITIALIZATION
|
|
//#############################################################################
|
|
|
|
void InitializeR5Dedicated()
|
|
{
|
|
SetupConsole();
|
|
Hooks::InstallHooks();
|
|
Hooks::DedicatedPatch();
|
|
printf("+-----------------------------------------------------------------------------+\n");
|
|
printf("| R5 DEDICATED SERVER --------------------------------------------------- |\n");
|
|
printf("+-----------------------------------------------------------------------------+\n");
|
|
printf("\n");
|
|
}
|
|
|
|
void TerminateR5Dedicated()
|
|
{
|
|
FreeConsole();
|
|
Hooks::RemoveHooks();
|
|
}
|
|
|
|
//#############################################################################
|
|
// ENTRYPOINT
|
|
//#############################################################################
|
|
|
|
BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved)
|
|
{
|
|
|
|
switch (dwReason)
|
|
{
|
|
case DLL_PROCESS_ATTACH:
|
|
{
|
|
InitializeR5Dedicated();
|
|
break;
|
|
}
|
|
|
|
case DLL_PROCESS_DETACH:
|
|
{
|
|
TerminateR5Dedicated();
|
|
break;
|
|
}
|
|
}
|
|
|
|
return TRUE;
|
|
}
|