that's mirrors working properly then.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@184 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
1472d7ee24
commit
c680b957a2
2 changed files with 9 additions and 1 deletions
|
@ -67,6 +67,7 @@ int playertextures; // up to 16 color translated skins
|
|||
int mirrortexturenum; // quake texturenum, not gltexturenum
|
||||
qboolean mirror;
|
||||
mplane_t *mirror_plane;
|
||||
msurface_t *r_mirror_chain;
|
||||
|
||||
void R_DrawAliasModel (entity_t *e);
|
||||
|
||||
|
@ -1381,6 +1382,8 @@ void R_MirrorAddPlayerModels (void)
|
|||
VectorCopy (exact.origin, ent->origin);
|
||||
}
|
||||
|
||||
VectorCopy(cl.simorg[0], ent->origin);
|
||||
|
||||
if (state->effects & EF_FLAG1)
|
||||
CL_AddFlagModels (ent, 0);
|
||||
else if (state->effects & EF_FLAG2)
|
||||
|
@ -1428,6 +1431,8 @@ void R_Mirror (void)
|
|||
r_refdef.vieworg[2] = 64;
|
||||
*/
|
||||
|
||||
AngleVectors (r_refdef.viewangles, vpn, vright, vup);
|
||||
|
||||
|
||||
gldepthmin = 0.5;
|
||||
gldepthmax = 1;
|
||||
|
@ -1461,8 +1466,9 @@ void R_Mirror (void)
|
|||
// blend on top
|
||||
glDisable(GL_ALPHA_TEST);
|
||||
glEnable (GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glColor4f (1,1,1,r_mirroralpha.value);
|
||||
s = cl.worldmodel->textures[mirrortexturenum]->texturechain;
|
||||
s = r_mirror_chain;
|
||||
for ( ; s ; s=s->texturechain)
|
||||
R_RenderBrushPoly (s);
|
||||
cl.worldmodel->textures[mirrortexturenum]->texturechain = NULL;
|
||||
|
|
|
@ -53,6 +53,7 @@ lightmapinfo_t **lightmap;
|
|||
int numlightmaps;
|
||||
|
||||
msurface_t *r_alpha_surfaces = NULL;
|
||||
extern msurface_t *r_mirror_chain;
|
||||
|
||||
mleaf_t *r_vischain; // linked list of visible leafs
|
||||
|
||||
|
@ -1698,6 +1699,7 @@ void R_MirrorChain (msurface_t *s)
|
|||
{
|
||||
if (mirror)
|
||||
return;
|
||||
r_mirror_chain = s;
|
||||
mirror = true;
|
||||
mirror_plane = s->plane;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue