mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
ref_soft: Fix water
This commit is contained in:
parent
77e296ffef
commit
eeda097603
17
r_main.c
17
r_main.c
@ -1903,6 +1903,22 @@ void R_NewMap (void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
================
|
||||||
|
R_InitTurb
|
||||||
|
================
|
||||||
|
*/
|
||||||
|
void R_InitTurb (void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i=0 ; i<1280 ; i++)
|
||||||
|
{
|
||||||
|
sintable[i] = AMP + sin(i*3.14159*2/CYCLE)*AMP;
|
||||||
|
intsintable[i] = AMP2 + sin(i*3.14159*2/CYCLE)*AMP2; // AMP2, not 20
|
||||||
|
blanktable[i] = 0; //PGM
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1967,6 +1983,7 @@ qboolean R_Init()
|
|||||||
view_clipplanes[1].leftedge = view_clipplanes[2].leftedge =view_clipplanes[3].leftedge = false;
|
view_clipplanes[1].leftedge = view_clipplanes[2].leftedge =view_clipplanes[3].leftedge = false;
|
||||||
view_clipplanes[0].rightedge = view_clipplanes[2].rightedge = view_clipplanes[3].rightedge = false;
|
view_clipplanes[0].rightedge = view_clipplanes[2].rightedge = view_clipplanes[3].rightedge = false;
|
||||||
R_StudioInit();
|
R_StudioInit();
|
||||||
|
R_InitTurb();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
2
r_poly.c
2
r_poly.c
@ -1072,7 +1072,7 @@ void R_BuildPolygonFromSurface(msurface_t *fa)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// todo: water
|
// todo: water
|
||||||
if ( fa->texinfo->flags & SURF_DRAWTURB )
|
if ( fa->flags & SURF_DRAWTURB )
|
||||||
{
|
{
|
||||||
image_t *pic = R_GetTexture(fa->texinfo->texture->gl_texturenum);
|
image_t *pic = R_GetTexture(fa->texinfo->texture->gl_texturenum);
|
||||||
r_polydesc.pixels = pic->pixels[0];
|
r_polydesc.pixels = pic->pixels[0];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user