Written by Jacques Krige (Korax)
So, are we ready to get rid of one of the most irritating features
of GL Hexen2, with one of the easiest Hexen2 tutorials out there?
void DrawGLWaterPoly (glpoly_t *p) { int i; float *v; float s, t, os, ot; //vec3_t nv; glBegin (GL_TRIANGLE_FAN); v =p->verts[0]; for (i=0; iThis takes care of the wall surface itself. Now, lets do the lightmap. Right below the above function you should find one called "DrawGLWaterPolyLightmap". When you found that, again, replace it with this one I already modified for you. void DrawGLWaterPolyLightmap (glpoly_t *p) { int i; float *v; float s, t, os, ot; //vec3_t nv; glBegin (GL_TRIANGLE_FAN); v =p->verts[0]; for (i=0; iThere you go! No more waterwarps! Does it get easier than this? Okie, one thing you should notice is that this state is "Hard-coded". If you really want to make it set-able, you'll have to add a new CVAR and do the needed changes to these above functions. Hope you enjoyed the tutorial! ;) Jacques Krige. |