probably prevents current map from randomly showing up in the mapvote itself
This commit is contained in:
parent
1df4cdf8dc
commit
80d0b85367
@ -2183,6 +2183,8 @@ void CreateNextVote()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char currentmap[256];
|
||||||
|
GetCurrentMap(currentmap, PLATFORM_MAX_PATH);
|
||||||
// find random maps which honor all restrictions
|
// find random maps which honor all restrictions
|
||||||
int pickedFromCasualPool = 0;
|
int pickedFromCasualPool = 0;
|
||||||
for(int i = 0; i < limit; i++)
|
for(int i = 0; i < limit; i++)
|
||||||
@ -2193,6 +2195,10 @@ void CreateNextVote()
|
|||||||
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);
|
||||||
|
|
||||||
|
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 we abandon the feature again its important to just set mce_randomized_maps_from_casual_pool to 0.
|
||||||
if (pickedFromCasualPool < g_iMapsFromCasualPool)
|
if (pickedFromCasualPool < g_iMapsFromCasualPool)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user