mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-31 00:30:57 +00:00
better progs access error checking and cleanups resulting from it. Fixes
mega2k and nq.
This commit is contained in:
parent
5e993575a4
commit
f6073d756f
15 changed files with 181 additions and 142 deletions
|
@ -280,8 +280,8 @@ typedef struct
|
|||
// LordHavoc: Endy neglected to mark this as a QSG version 2 thingy...
|
||||
byte alpha;
|
||||
byte scale;
|
||||
byte glowsize;
|
||||
byte glowcolor;
|
||||
byte glow_size;
|
||||
byte glow_color;
|
||||
byte colormod;
|
||||
} entity_state_t;
|
||||
|
||||
|
|
|
@ -74,8 +74,8 @@ typedef struct entity_s
|
|||
float colormod[3]; // color tint for model
|
||||
float alpha; // opacity (alpha) of the model
|
||||
float scale; // size scaler of the model
|
||||
float glowsize; // how big the glow is (can be negative)
|
||||
byte glowcolor; // color of glow (paletted)
|
||||
float glow_size; // how big the glow is (can be negative)
|
||||
byte glow_color; // color of glow (paletted)
|
||||
|
||||
// FIXME: could turn these into a union
|
||||
int trivial_accept;
|
||||
|
|
|
@ -150,15 +150,15 @@ typedef struct
|
|||
|
||||
int alpha;
|
||||
int scale;
|
||||
int glowsize;
|
||||
int glowcolor;
|
||||
int glow_size;
|
||||
int glow_color;
|
||||
int colormod;
|
||||
} sv_fields_t;
|
||||
|
||||
extern sv_fields_t sv_fields;
|
||||
|
||||
#if 1
|
||||
#define SVFIELD(e,f,t) ((ED_FindField (&sv_pr_state, #f)->type == ev_##t) ? E_var (e, sv_fields.f, t) : PR_Error (&sv_pr_state, "bad type access %s:%d", __FILE__, __LINE__), E_var (e, sv_fields.f, t))
|
||||
#define SVFIELD(e,f,t) E_var (e, PR_AccessField (&sv_pr_state, #f, ev_##t, __FILE__, __LINE__), t)
|
||||
#else
|
||||
#define SVFIELD(e,f,t) E_var (e, sv_fields.f, t)
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue