From 612f87c14d4a248f46cc26b45e09f505e5b417dd Mon Sep 17 00:00:00 2001 From: Mikusch Date: Fri, 18 Aug 2023 00:19:07 +0200 Subject: [PATCH] Reverse wearable removal loop --- addons/sourcemod/scripting/scp_sf.sp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sourcemod/scripting/scp_sf.sp b/addons/sourcemod/scripting/scp_sf.sp index 014982ad..bd1a3d63 100644 --- a/addons/sourcemod/scripting/scp_sf.sp +++ b/addons/sourcemod/scripting/scp_sf.sp @@ -2032,7 +2032,7 @@ public Action TF2Items_OnGiveNamedItem(int client, char[] classname, int index, delete regions; // Remove any wearable that has a conflicting equip_region - for (int wbl = 0; wbl < TF2Util_GetPlayerWearableCount(client); wbl++) + for (int wbl = TF2Util_GetPlayerWearableCount(client) - 1; wbl >= 0; wbl--) { int wearable = TF2Util_GetPlayerWearable(client, wbl); if (wearable == -1)