]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - progsvm.h
fixed support of progs.dat files with important global and field names removed, such...
[xonotic/darkplaces.git] / progsvm.h
index 17cf73693d5fa6e8512d864b2ac9544e199741ce..cb467595a70d12d92a179a941e3e1ec8495b267d 100644 (file)
--- a/progsvm.h
+++ b/progsvm.h
@@ -461,6 +461,8 @@ mfunction_t *PRVM_ED_FindFunction(const char *name);
 int PRVM_ED_FindFieldOffset(const char *name);
 int PRVM_ED_FindGlobalOffset(const char *name);
 func_t PRVM_ED_FindFunctionOffset(const char *name);
+#define PRVM_ED_FindFieldOffset_FromStruct(st, field) prog->fieldoffsets . field = ((int *)(&((st *)NULL)-> field ) - ((int *)NULL))
+#define PRVM_ED_FindGlobalOffset_FromStruct(st, field) prog->globaloffsets . field = ((int *)(&((st *)NULL)-> field ) - ((int *)NULL))
 
 void PRVM_MEM_IncreaseEdicts(void);