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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user