blob: 48ade24d9cf4367713ec2f45308bfea3b83298ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#pragma once
#include "pch.h"
#include "dedicated.h"
#include "dedicatedmaterialsystem.h"
#include "hookutils.h"
void InitialiseDedicatedMaterialSystem(HMODULE baseAddress)
{
if (!IsDedicated())
return;
{
// CMaterialSystem::FindMaterial
char* ptr = (char*)baseAddress + 0x5F0F1;
TempReadWrite rw(ptr);
// make the game always use the error material
*ptr = 0xE9;
*(ptr + 1) = (char)0x34;
*(ptr + 2) = (char)0x03;
*(ptr + 3) = (char)0x00;
}
}
|