changed true to false so CD is put on for when no map restrictions because of less than min requirement for enabling nomination restrictions

This commit is contained in:
jenz 2024-02-08 18:43:22 +01:00
parent 3713304d0d
commit dbcc12fb03

View File

@ -526,7 +526,7 @@ public void OnMapStart()
} }
g_Config.Rewind(); g_Config.Rewind();
if(InternalAreRestrictionsActive(true)) if(InternalAreRestrictionsActive(false))
g_SaveCDOnMapEnd = true; g_SaveCDOnMapEnd = true;
else else
g_SaveCDOnMapEnd = false; g_SaveCDOnMapEnd = false;
@ -3040,6 +3040,13 @@ stock int InternalGetMapPlayerRestriction(const char[] map)
return 0; return 0;
} }
/*
false means we never put the map on cooldown if time range is inside the no map restriction time or
if less than the minimum active players for enabling map restrictions are on the server.
true means we put maps on Cooldown even if there was no map restrictions because of less than 15 active players (the number is a cvar, its not static)
true still respects the time range with no map restrictions (23:30 to 10:30 right now) and wont apply cooldown there.
*/
stock bool InternalAreRestrictionsActive(bool skip_player_check) stock bool InternalAreRestrictionsActive(bool skip_player_check)
{ {
if (!GetConVarBool(g_Cvar_NoRestrictionTimeframeEnable)) if (!GetConVarBool(g_Cvar_NoRestrictionTimeframeEnable))