diff --git a/source/src/rendercubes.cpp b/source/src/rendercubes.cpp index 6d013586..49503b4d 100644 --- a/source/src/rendercubes.cpp +++ b/source/src/rendercubes.cpp @@ -516,9 +516,9 @@ VAR(mtwater, 0, 1, 1); int renderwater(float hf, GLuint reflecttex, GLuint refracttex) { if(wx1<0) return nquads; - - wx1 &= ~(watersubdiv-1); - wy1 &= ~(watersubdiv-1); + + wx1 -= wx1%watersubdiv; + wy1 -= wy1%watersubdiv; float t = lastmillis/300.0f; diff --git a/source/src/rendermodel.cpp b/source/src/rendermodel.cpp index 139fecf3..7ae5e02b 100644 --- a/source/src/rendermodel.cpp +++ b/source/src/rendermodel.cpp @@ -115,7 +115,7 @@ void rendermodel(char *mdl, int anim, int tex, float rad, float x, float y, floa light.y = s->g/ll+of; light.z = s->b/ll+of; - if(dynshadow && m->hasshadows() && !reflecting) + if(dynshadow && m->hasshadows() && (!reflecting || refracting)) { vec center(x, z, s->floor); if(s->type==FHF) center.z -= s->vdelta/4.0f;