Clean up decal behavior

Only update the mesh if a decal was truly created/destroyed
This commit is contained in:
Boondorl 2024-12-12 22:27:16 -05:00 committed by Nash Muhandes
commit 4d5bba8d02
4 changed files with 22 additions and 13 deletions

View file

@ -255,19 +255,8 @@ void DBaseDecal::SetShade (int r, int g, int b)
FTextureID DBaseDecal::StickToWall (side_t *wall, double x, double y, F3DFloor *ffloor)
{
Side = wall;
WallPrev = wall->AttachedDecals;
while (WallPrev != nullptr && WallPrev->WallNext != nullptr)
{
WallPrev = WallPrev->WallNext;
}
if (WallPrev != nullptr) WallPrev->WallNext = this;
else wall->AttachedDecals = this;
WallNext = nullptr;
LevelMeshUpdater->SideDecalsChanged(wall);
Side = nullptr;
WallNext = WallPrev = nullptr;
sector_t *front, *back;
line_t *line;