summaryrefslogtreecommitdiffstats
path: root/src/References.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/References.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/References.cpp b/src/References.cpp
new file mode 100644
index 00000000..187f4ffa
--- /dev/null
+++ b/src/References.cpp
@@ -0,0 +1,22 @@
+#include "common.h"
+#include "patcher.h"
+#include "References.h"
+
+CReference *CReferences::aRefs = (CReference*)0x70BBE0; //[NUMREFERENCES];
+CReference *&CReferences::pEmptyList = *(CReference**)0x8F1AF8;
+
+void
+CReferences::Init(void)
+{
+ int i;
+ pEmptyList = &aRefs[0];
+ for(i = 0; i < NUMREFERENCES; i++){
+ aRefs[i].pentity = nil;
+ aRefs[i].next = &aRefs[i+1];
+ }
+ aRefs[NUMREFERENCES-1].next = nil;
+}
+
+STARTPATCHES
+ InjectHook(0x4A7350, CReferences::Init, PATCH_JUMP);
+ENDPATCHES