From 55ae02f320e8a4b365f6520f6dc19e2c2101dff7 Mon Sep 17 00:00:00 2001 From: Charlie Date: Tue, 1 Oct 2024 03:27:33 +0800 Subject: [PATCH] fix index stepping to avoid pushing front layers into back layers (#32553) Co-authored-by: charlie --- Content.Client/Clothing/ClientClothingSystem.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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++; } } -- 2.51.2