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;
|
return;
|
||||||
}
|
}
|
||||||
g_Config.Rewind();
|
g_Config.Rewind();
|
||||||
|
ClearArray(g_hTopImpactMaps);
|
||||||
FillMapsByImpact(0);
|
FillMapsByImpact(0);
|
||||||
|
|
||||||
char currentmap[256];
|
char currentmap[256];
|
||||||
@@ -623,7 +624,6 @@ public void OnTransferComplete(HTTPResponse response, int offset)
|
|||||||
delete root;
|
delete root;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ClearArray(g_hTopImpactMaps);
|
|
||||||
|
|
||||||
Handle tempMaps = CloneArray(g_MapList);
|
Handle tempMaps = CloneArray(g_MapList);
|
||||||
|
|
||||||
@@ -646,6 +646,7 @@ public void OnTransferComplete(HTTPResponse response, int offset)
|
|||||||
}
|
}
|
||||||
if (FindStringInArray(tempMaps, mapName) != -1)
|
if (FindStringInArray(tempMaps, mapName) != -1)
|
||||||
{
|
{
|
||||||
|
//LogMessage("added mapName to casualpool: %s. pool size: %i", mapName, GetArraySize(g_hTopImpactMaps));
|
||||||
PushArrayString(g_hTopImpactMaps, mapName);
|
PushArrayString(g_hTopImpactMaps, mapName);
|
||||||
}
|
}
|
||||||
delete entry;
|
delete entry;
|
||||||
@@ -2273,7 +2274,7 @@ void CreateNextVote()
|
|||||||
for(int i = 0; i < limit; i++)
|
for(int i = 0; i < limit; i++)
|
||||||
{
|
{
|
||||||
int b;
|
int b;
|
||||||
for(int j = 0; j < 1000; j++)
|
for(int j = 0; j < 2000; j++)
|
||||||
{
|
{
|
||||||
b = GetRandomInt(0, GetArraySize(tempMaps) - 1);
|
b = GetRandomInt(0, GetArraySize(tempMaps) - 1);
|
||||||
GetArrayString(tempMaps, b, map, PLATFORM_MAX_PATH);
|
GetArrayString(tempMaps, b, map, PLATFORM_MAX_PATH);
|
||||||
@@ -2292,6 +2293,7 @@ void CreateNextVote()
|
|||||||
if (InternalGetMapCooldownTime(map) > GetTime())
|
if (InternalGetMapCooldownTime(map) > GetTime())
|
||||||
continue;
|
continue;
|
||||||
pickedFromCasualPool++;
|
pickedFromCasualPool++;
|
||||||
|
//LogMessage("picked map %s from CasualPool", map);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//march 31st 2026: mce_enable_map_restrictions_min_player_count now also skips all maps on cooldown
|
//march 31st 2026: mce_enable_map_restrictions_min_player_count now also skips all maps on cooldown
|
||||||
|
|||||||
Reference in New Issue
Block a user