From 669d23ed04e72c3bf4e43b408decb059060b4e8f Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Sun, 18 Sep 2022 21:15:19 +0700 Subject: [PATCH] synchronize animated flats (#736) --- src/p_spec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/p_spec.c b/src/p_spec.c index 722f316b..472f99d7 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -2299,17 +2299,17 @@ void P_UpdateSpecials (void) // Animate flats and textures globally for (anim = anims ; anim < lastanim ; anim++) - for (i=anim->basepic ; ibasepic+anim->numpics ; i++) + for (i = 0 ; i < anim->numpics ; i++) { pic = anim->basepic + ( (leveltime/anim->speed + i)%anim->numpics ); if (anim->istexture) - texturetranslation[i] = pic; + texturetranslation[anim->basepic + i] = pic; else { - flattranslation[i] = pic; + flattranslation[anim->basepic + i] = pic; // [crispy] add support for SMMU swirling flats if (anim->speed > 65535 || anim->numpics == 1 || r_swirl) - flattranslation[i] = -1; + flattranslation[anim->basepic + i] = -1; } }