From 54a921c1a5ae39c706ae59313f45db75117bc23e Mon Sep 17 00:00:00 2001 From: jenz Date: Mon, 5 Oct 2026 10:55:18 +0200 Subject: [PATCH] 1000 should be completely fine, but increasing to 2000. Also fixed that cleararray only happens on mapstart and not every time the function is called again to fetch more results from impact api --- mapchooser_extended/scripting/mapchooser_extended_unloze.sp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mapchooser_extended/scripting/mapchooser_extended_unloze.sp b/mapchooser_extended/scripting/mapchooser_extended_unloze.sp index fcbb1f9..6805555 100755 --- a/mapchooser_extended/scripting/mapchooser_extended_unloze.sp +++ b/mapchooser_extended/scripting/mapchooser_extended_unloze.sp @@ -583,6 +583,7 @@ public void OnMapStart() return; } g_Config.Rewind(); + ClearArray(g_hTopImpactMaps); FillMapsByImpact(0); char currentmap[256]; @@ -623,7 +624,6 @@ public void OnTransferComplete(HTTPResponse response, int offset) delete root; return; } - ClearArray(g_hTopImpactMaps); Handle tempMaps = CloneArray(g_MapList); @@ -646,6 +646,7 @@ public void OnTransferComplete(HTTPResponse response, int offset) } if (FindStringInArray(tempMaps, mapName) != -1) { + //LogMessage("added mapName to casualpool: %s. pool size: %i", mapName, GetArraySize(g_hTopImpactMaps)); PushArrayString(g_hTopImpactMaps, mapName); } delete entry; @@ -2273,7 +2274,7 @@ void CreateNextVote() for(int i = 0; i < limit; i++) { int b; - for(int j = 0; j < 1000; j++) + for(int j = 0; j < 2000; j++) { b = GetRandomInt(0, GetArraySize(tempMaps) - 1); GetArrayString(tempMaps, b, map, PLATFORM_MAX_PATH); @@ -2292,6 +2293,7 @@ void CreateNextVote() if (InternalGetMapCooldownTime(map) > GetTime()) continue; pickedFromCasualPool++; + //LogMessage("picked map %s from CasualPool", map); break; } //march 31st 2026: mce_enable_map_restrictions_min_player_count now also skips all maps on cooldown