Put the transparent surfaces on the water chain.

I'd actually done this the first time, but then got confused and forgot the
waterchain works with multiple textures. This is actually the right place
as all transparent surfaces need to be sorted irrespective to their
textures. Really, waterchain needs to be renamed.
This commit is contained in:
Bill Currie 2012-01-31 18:08:06 +09:00
parent b286a35281
commit 706f09b247

View file

@ -354,10 +354,10 @@ chain_surface (msurface_t *surf, vec_t *transform, float *color)
{
instsurf_t *is;
if (surf->flags & SURF_DRAWTURB) {
CHAIN_SURF_B2F (surf, waterchain);
} else if (surf->flags & SURF_DRAWSKY) {
if (surf->flags & SURF_DRAWSKY) {
CHAIN_SURF_F2B (surf, sky_chain);
} else if ((surf->flags & SURF_DRAWTURB) || (color && color[3] < 1.0)) {
CHAIN_SURF_B2F (surf, waterchain);
} else {
texture_t *tex;
@ -365,10 +365,7 @@ chain_surface (msurface_t *surf, vec_t *transform, float *color)
tex = surf->texinfo->texture;
else
tex = R_TextureAnimation (surf);
if (color && color[3] < 1.0)
CHAIN_SURF_B2F (surf, tex->tex_chain);
else
CHAIN_SURF_F2B (surf, tex->tex_chain);
CHAIN_SURF_F2B (surf, tex->tex_chain);
update_lightmap (surf);
}