mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-22 02:11:19 +00:00
[model] Clean out some useless surface flags
The gl water warp ones have been useless since very early on due to not doing water warp in gl (vertex warping just didn't work well), and the recent water warp implementation doesn't need those hacks. The rest of the removed flags just aren't needed for anything. SURF_DRAWNOALPHA might get renamed, but should be useful for translucent bsp surfaces (eg, vines in ad_tears).
This commit is contained in:
parent
c8472755d1
commit
c6f520b743
3 changed files with 8 additions and 33 deletions
|
@ -102,17 +102,13 @@ typedef struct texture_s {
|
|||
} texture_t;
|
||||
|
||||
|
||||
#define SURF_PLANEBACK 2
|
||||
#define SURF_DRAWSKY 4
|
||||
#define SURF_DRAWSPRITE 8
|
||||
#define SURF_DRAWTURB 0x10
|
||||
#define SURF_DRAWTILED 0x20
|
||||
#define SURF_DRAWBACKGROUND 0x40
|
||||
#define SURF_UNDERWATER 0x80
|
||||
#define SURF_DONTWARP 0x100
|
||||
#define SURF_DRAWNOALPHA 0x200
|
||||
#define SURF_DRAWFULLBRIGHT 0x400
|
||||
#define SURF_LIGHTBOTHSIDES 0x800
|
||||
#define SURF_PLANEBACK 0x02
|
||||
#define SURF_DRAWSKY 0x04
|
||||
#define SURF_DRAWTURB 0x08
|
||||
#define SURF_DRAWTILED 0x10
|
||||
#define SURF_DRAWBACKGROUND 0x20
|
||||
#define SURF_DRAWNOALPHA 0x40
|
||||
#define SURF_LIGHTBOTHSIDES 0x80
|
||||
|
||||
// !!! if this is changed, it must be changed in asm_draw.h too !!!
|
||||
typedef struct {
|
||||
|
|
|
@ -760,7 +760,6 @@ Mod_LoadLeafs (model_t *mod, bsp_t *bsp)
|
|||
dleaf_t *in;
|
||||
int count, i, j, p;
|
||||
mleaf_t *out;
|
||||
qboolean isnotmap = true;
|
||||
mod_brush_t *brush = &mod->brush;
|
||||
|
||||
in = bsp->leafs;
|
||||
|
@ -769,10 +768,6 @@ Mod_LoadLeafs (model_t *mod, bsp_t *bsp)
|
|||
|
||||
brush->leafs = out;
|
||||
brush->modleafs = count;
|
||||
// snprintf(s, sizeof (s), "maps/%s.bsp",
|
||||
// Info_ValueForKey(cl.serverinfo,"map"));
|
||||
if (!strncmp ("maps/", mod->path, 5))
|
||||
isnotmap = false;
|
||||
for (i = 0; i < count; i++, in++, out++) {
|
||||
for (j = 0; j < 3; j++) {
|
||||
out->mins[j] = in->mins[j];
|
||||
|
@ -794,22 +789,6 @@ Mod_LoadLeafs (model_t *mod, bsp_t *bsp)
|
|||
|
||||
for (j = 0; j < 4; j++)
|
||||
out->ambient_sound_level[j] = in->ambient_level[j];
|
||||
|
||||
// gl underwater warp
|
||||
if (out->contents != CONTENTS_EMPTY) {
|
||||
msurface_t **msurf = brush->marksurfaces + out->firstmarksurface;
|
||||
for (j = 0; j < out->nummarksurfaces; j++) {
|
||||
msurface_t *surf = *msurf++;
|
||||
surf->flags |= SURF_UNDERWATER;
|
||||
}
|
||||
}
|
||||
if (isnotmap) {
|
||||
msurface_t **msurf = brush->marksurfaces + out->firstmarksurface;
|
||||
for (j = 0; j < out->nummarksurfaces; j++) {
|
||||
msurface_t *surf = *msurf++;
|
||||
surf->flags |= SURF_DONTWARP;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -856,7 +856,7 @@ GL_BuildSurfaceDisplayList (mod_brush_t *brush, msurface_t *surf)
|
|||
}
|
||||
|
||||
// remove co-linear points - Ed
|
||||
if (!gl_keeptjunctions && !(surf->flags & SURF_UNDERWATER)) {
|
||||
if (!gl_keeptjunctions) {
|
||||
for (i = 0; i < lnumverts; ++i) {
|
||||
vec3_t v1, v2;
|
||||
float *prev, *this, *next;
|
||||
|
|
Loading…
Reference in a new issue