summaryrefslogtreecommitdiff
path: root/src/refresh/gl/tess.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2013-02-25 16:56:39 +0400
committerAndrey Nazarov <skuller@skuller.net>2013-02-25 16:56:39 +0400
commit1d77c76a9c90a346fa139a994d4ba99fbc56c46a (patch)
tree297dd550a89e600ae2932849601e756aebe4fe4a /src/refresh/gl/tess.c
parent10e058882fc623f853a30ef69a4abc52608dee44 (diff)
Fix texture animation on BSP submodels.
Only world auto cycles, regular BSP submodels use entity frame number for texture animation.
Diffstat (limited to 'src/refresh/gl/tess.c')
-rw-r--r--src/refresh/gl/tess.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/refresh/gl/tess.c b/src/refresh/gl/tess.c
index deb339f..3a671a3 100644
--- a/src/refresh/gl/tess.c
+++ b/src/refresh/gl/tess.c
@@ -397,13 +397,12 @@ static int GL_CopyVerts(mface_t *surf)
static int GL_TextureAnimation(mtexinfo_t *tex)
{
- int frame, c;
+ int c;
if (!tex->next)
return tex->image->texnum;
- frame = (int)(glr.fd.time * 2);
- c = frame % tex->numframes;
+ c = glr.ent->frame % tex->numframes;
while (c) {
tex = tex->next;
c--;
@@ -503,6 +502,8 @@ void GL_DrawSolidFaces(void)
void GL_DrawAlphaFaces(void)
{
+ glr.ent = &gl_world;
+
GL_BindArrays();
GL_Bits(GLS_BLEND_BLEND | GLS_DEPTHMASK_FALSE);