diff --git a/src/g_shared/a_decals.cpp b/src/g_shared/a_decals.cpp index df9746a021..e73788363c 100644 --- a/src/g_shared/a_decals.cpp +++ b/src/g_shared/a_decals.cpp @@ -548,17 +548,14 @@ CUSTOM_CVAR (Int, cl_maxdecals, 1024, CVAR_ARCHIVE) } else { - ForAllLevels([&](FLevelLocals *Level) + while (level.ImpactDecalCount > self) { - while (Level->ImpactDecalCount > self) + DThinker *thinker = DThinker::FirstThinker(STAT_AUTODECAL); + if (thinker != NULL) { - DThinker *thinker = DThinker::FirstThinker(STAT_AUTODECAL); - if (thinker != NULL) - { - thinker->Destroy(); - } + thinker->Destroy(); } - }); + } } } diff --git a/src/wi_stuff.cpp b/src/wi_stuff.cpp index 20465de882..9fc258ee45 100644 --- a/src/wi_stuff.cpp +++ b/src/wi_stuff.cpp @@ -615,6 +615,7 @@ void DInterBackground::drawBackground(int state, bool drawsplat, bool snl_pointe for (i = 0; itype & ANIM_CONDITION) {