- do not keep impact decal that fails to stick to a wall

Such invisible decals were not taken into account when calculating their total number
Changing cl_maxdecals CVAR may not work as expected because of limit counter's inconsistent value

https://forum.zdoom.org/viewtopic.php?t=70457
This commit is contained in:
alexey.lysiuk 2020-11-01 12:17:40 +02:00 committed by Christoph Oelckers
parent 515742033e
commit 381d2bcd73

View file

@ -755,6 +755,7 @@ DImpactDecal *DImpactDecal::StaticCreate (FLevelLocals *Level, const FDecalTempl
if (!decal->StickToWall (wall, pos.X, pos.Y, ffloor).isValid())
{
decal->Destroy();
return NULL;
}
decal->CheckMax();