git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6852
d7cf8633-e32d-0410-b094-
e92efae38249
}
prvm_edict_t;
-#define PRVM_EDICTFIELDVALUE(ed, fieldoffset) (fieldoffset ? (prvm_eval_t *)((unsigned char *)ed->v + fieldoffset) : NULL)
+#define PRVM_EDICTFIELDVALUE(ed, fieldoffset) (fieldoffset ? (prvm_eval_t *)((int *)ed->v + fieldoffset) : NULL)
//============================================================================
} fields;
} prvm_edict_t;
-#define PRVM_EDICTFIELDVALUE(ed, fieldoffset) (fieldoffset >= 0 ? (prvm_eval_t *)((unsigned char *)ed->fields.vp + fieldoffset) : NULL)
-#define PRVM_GLOBALFIELDVALUE(fieldoffset) (fieldoffset >= 0 ? (prvm_eval_t *)((unsigned char *)prog->globals.generic + fieldoffset) : NULL)
+#define PRVM_EDICTFIELDVALUE(ed, fieldoffset) (fieldoffset >= 0 ? (prvm_eval_t *)((int *)ed->fields.vp + fieldoffset) : NULL)
+#define PRVM_GLOBALFIELDVALUE(fieldoffset) (fieldoffset >= 0 ? (prvm_eval_t *)((int *)prog->globals.generic + fieldoffset) : NULL)
//============================================================================
#define PRVM_OP_STATE 1
d = PRVM_ED_FindField(field);
if (!d)
return -1;
- return d->ofs*4;
+ return d->ofs;
}
int PRVM_ED_FindGlobalOffset(const char *global)
d = PRVM_ED_FindGlobal(global);
if (!d)
return -1;
- return d->ofs*4;
+ return d->ofs;
}
func_t PRVM_ED_FindFunctionOffset(const char *function)