probably prevents current map from randomly showing up in the mapvote itself

This commit is contained in:
jenz 2026-04-30 14:18:23 +02:00
parent 1df4cdf8dc
commit 80d0b85367

View File

@ -2183,6 +2183,8 @@ void CreateNextVote()
}
}
char currentmap[256];
GetCurrentMap(currentmap, PLATFORM_MAX_PATH);
// find random maps which honor all restrictions
int pickedFromCasualPool = 0;
for(int i = 0; i < limit; i++)
@ -2193,6 +2195,10 @@ void CreateNextVote()
b = GetRandomInt(0, GetArraySize(tempMaps) - 1);
GetArrayString(tempMaps, b, map, PLATFORM_MAX_PATH);
if (StrEqual(currentmap, map))
{
continue; //probably prevents the current map from popping up in the vote.
}
//if we abandon the feature again its important to just set mce_randomized_maps_from_casual_pool to 0.
if (pickedFromCasualPool < g_iMapsFromCasualPool)
{