blob: fca9c1693dd3a63d8a54c646736d16ebca26fee7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#include "pch.h"
#include "miscserverfixes.h"
#include "hookutils.h"
void InitialiseMiscServerFixes(HMODULE baseAddress)
{
// ret at the start of the concommand GenerateObjFile as it can crash servers
{
char* ptr = reinterpret_cast<char*>(baseAddress) + 0x38D920;
TempReadWrite rw(ptr);
*ptr = 0xC3;
}
// nop out call to VGUI shutdown since it crashes the game when quitting from the console
{
char* ptr = reinterpret_cast<char*>(baseAddress) + 0x154A96;
TempReadWrite rw(ptr);
*(ptr++) = 0x90; // nop
*(ptr++) = 0x90; // nop
*(ptr++) = 0x90; // nop
*(ptr++) = 0x90; // nop
*ptr = 0x90; // nop
}
// ret at the start of CServerGameClients::ClientCommandKeyValues as it has no benefit and is forwarded to client (i.e. security issue)
// this prevents the attack vector of client=>server=>client, however server=>client also has clientside patches
{
char* ptr = reinterpret_cast<char*>(baseAddress) + 0x153920;
TempReadWrite rw(ptr);
*ptr = 0xC3;
}
}
void InitialiseMiscEngineServerFixes(HMODULE baseAddress)
{
}
|