From 287628bfee333bc1565054823d01419fb66e24d5 Mon Sep 17 00:00:00 2001 From: stickz Date: Wed, 8 Jul 2020 21:36:50 -0400 Subject: [PATCH] mapchooser: Clear map history on limit change (#1197) This commit fixes a bug where if the value of `sm_mapvote_exclude` is reduced, the change may not take effect right away. --- plugins/mapchooser.sp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mapchooser.sp b/plugins/mapchooser.sp index 327a85a6..3aff9249 100644 --- a/plugins/mapchooser.sp +++ b/plugins/mapchooser.sp @@ -260,7 +260,7 @@ public void OnMapEnd() RemoveStringFromArray(g_OldMapList, map); g_OldMapList.PushString(map); - if (g_OldMapList.Length > g_Cvar_ExcludeMaps.IntValue) + while (g_OldMapList.Length > g_Cvar_ExcludeMaps.IntValue) { g_OldMapList.Erase(0); }