Un-hardcode all CHostState dependencies

The SDK now works on executables with ASLR enabled.
!TODO: Dedicated.
This commit is contained in:
Kawe Mazidjatari
2022-04-12 02:48:46 +02:00
parent db141d5edb
commit e1f5e7d46b
20 changed files with 214 additions and 64 deletions

View File

@@ -58,6 +58,7 @@
#endif // !CLIENT_DLL
#include "engine/common.h"
#include "engine/cmodel_bsp.h"
#include "engine/host.h"
#include "engine/host_cmd.h"
#include "engine/host_state.h"
#include "engine/modelloader.h"
@@ -107,12 +108,18 @@
void Systems_Init()
{
CheckCPU();
CFastTimer masterTimer;
masterTimer.Start();
for (IDetour* pdetour : vDetour)
{
pdetour->GetFun();
pdetour->GetVar();
pdetour->GetCon();
}
masterTimer.End();
//printf("DLL initialization took %f seconds\n", masterTimer.GetDuration().GetSeconds());
// Initialize WinSock system.
WS_Init();

View File

@@ -5,6 +5,7 @@
#include <windows.h>
#include <WinSock2.h>
#include <comdef.h>
#include <setjmp.h>
#include <tchar.h>
#include <stdio.h>
#include <Psapi.h>