From: Charlie Date: Mon, 30 Sep 2024 19:27:33 +0000 (+0800) Subject: fix index stepping to avoid pushing front layers into back layers (#32553) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=55ae02f320e8a4b365f6520f6dc19e2c2101dff7;p=space-station-14.git fix index stepping to avoid pushing front layers into back layers (#32553) Co-authored-by: charlie --- diff --git a/Content.Client/Clothing/ClientClothingSystem.cs b/Content.Client/Clothing/ClientClothingSystem.cs index 27d77eda49..3462fc9236 100644 --- a/Content.Client/Clothing/ClientClothingSystem.cs +++ b/Content.Client/Clothing/ClientClothingSystem.cs @@ -320,7 +320,8 @@ public sealed class ClientClothingSystem : ClothingSystem if (layerData.State is not null && inventory.SpeciesId is not null && layerData.State.EndsWith(inventory.SpeciesId)) continue; - _displacement.TryAddDisplacement(displacementData, sprite, index, key, revealedLayers); + if (_displacement.TryAddDisplacement(displacementData, sprite, index, key, revealedLayers)) + index++; } }