--- quake2/ref_soft/r_edge.c 2018/04/24 17:58:33 1.1 +++ quake2/ref_soft/r_edge.c 2018/04/24 18:05:03 1.1.1.3 @@ -1,3 +1,22 @@ +/* +Copyright (C) 1997-2001 Id Software, Inc. + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ // r_edge.c #include "r_local.h" @@ -817,8 +836,15 @@ void D_CalcGradients (msurface_t *pface) ((pface->texturemins[1] << 16) >> miplevel) + pface->texinfo->vecs[1][3]*t; + // PGM - changing flow speed for non-warping textures. if (pface->texinfo->flags & SURF_FLOWING) - sadjust += 0x10000 * (-128 * ( (r_newrefdef.time*0.25) - (int)(r_newrefdef.time*0.25) )); + { + if(pface->texinfo->flags & SURF_WARP) + sadjust += 0x10000 * (-128 * ( (r_newrefdef.time * 0.25) - (int)(r_newrefdef.time * 0.25) )); + else + sadjust += 0x10000 * (-128 * ( (r_newrefdef.time * 0.77) - (int)(r_newrefdef.time * 0.77) )); + } + // PGM // // -1 (-epsilon) so we never wander off the edge of the texture @@ -878,7 +904,17 @@ void D_TurbulentSurf (surf_t *s) } D_CalcGradients (pface); - Turbulent8 (s->spans); + +//============ +//PGM + // textures that aren't warping are just flowing. Use NonTurbulent8 instead + if(!(pface->texinfo->flags & SURF_WARP)) + NonTurbulent8 (s->spans); + else + Turbulent8 (s->spans); +//PGM +//============ + D_DrawZSpans (s->spans); if (s->insubmodel)