had forgotten check for mapstart/mapend which is needed for actual CD

This commit is contained in:
jenz 2023-12-10 22:02:42 +01:00
parent 7995d7dd82
commit 7290cccb9d

View File

@ -526,7 +526,7 @@ public void OnMapStart()
}
g_Config.Rewind();
if(InternalAreRestrictionsActive())
if(InternalAreRestrictionsActive(true))
g_SaveCDOnMapEnd = true;
else
g_SaveCDOnMapEnd = false;
@ -1904,7 +1904,7 @@ void CreateNextVote()
GetCurrentMap(map, PLATFORM_MAX_PATH);
RemoveStringFromArray(tempMaps, map);
if(GetArraySize(tempMaps) > GetConVarInt(g_Cvar_ExcludeMaps) && InternalAreRestrictionsActive())
if(GetArraySize(tempMaps) > GetConVarInt(g_Cvar_ExcludeMaps) && InternalAreRestrictionsActive(false))
{
StringMapSnapshot OldMapListSnapshot = g_OldMapList.Snapshot();
for(int i = 0; i < OldMapListSnapshot.Length; i++)
@ -1915,7 +1915,7 @@ void CreateNextVote()
delete OldMapListSnapshot;
}
if(InternalAreRestrictionsActive())
if(InternalAreRestrictionsActive(false))
{
StringMapSnapshot TimeMapListSnapshot = g_TimeMapList.Snapshot();
for(int i = 0; i < TimeMapListSnapshot.Length; i++)
@ -1966,7 +1966,7 @@ void CreateNextVote()
b = GetRandomInt(0, GetArraySize(tempMaps) - 1);
GetArrayString(tempMaps, b, map, PLATFORM_MAX_PATH);
if(!InternalAreRestrictionsActive())
if(!InternalAreRestrictionsActive(false))
break;
if(InternalGetMapVIPRestriction(map))
@ -2402,7 +2402,7 @@ public int Native_CanNominate(Handle plugin, int numParams)
public int Native_ExcludeMap(Handle plugin, int numParams)
{
if(!InternalAreRestrictionsActive())
if(!InternalAreRestrictionsActive(false))
return true;
int len;
@ -2441,7 +2441,7 @@ public int Native_ExcludeMap(Handle plugin, int numParams)
public int Native_ExcludeMapTime(Handle plugin, int numParams)
{
if(!InternalAreRestrictionsActive())
if(!InternalAreRestrictionsActive(false))
return true;
int len;
@ -2483,7 +2483,7 @@ public int Native_ExcludeMapTime(Handle plugin, int numParams)
public int Native_GetMapCooldown(Handle plugin, int numParams)
{
if(!InternalAreRestrictionsActive())
if(!InternalAreRestrictionsActive(false))
return 0;
int len;
@ -2503,7 +2503,7 @@ public int Native_GetMapCooldown(Handle plugin, int numParams)
public int Native_GetMapCooldownTime(Handle plugin, int numParams)
{
if(!InternalAreRestrictionsActive())
if(!InternalAreRestrictionsActive(false))
return 0;
int len;
@ -2737,7 +2737,7 @@ public int Native_GetExtendsLeft(Handle plugin, int numParams)
public int Native_AreRestrictionsActive(Handle plugin, int numParams)
{
return InternalAreRestrictionsActive();
return InternalAreRestrictionsActive(false);
}
public int Native_SimulateMapEnd(Handle plugin, int numParams)
@ -3010,7 +3010,7 @@ stock int InternalGetMapPlayerRestriction(const char[] map)
return 0;
}
stock bool InternalAreRestrictionsActive()
stock bool InternalAreRestrictionsActive(bool skip_player_check)
{
if (!GetConVarBool(g_Cvar_NoRestrictionTimeframeEnable))
return true;
@ -3041,7 +3041,7 @@ stock bool InternalAreRestrictionsActive()
}
}
if (ActivePlayerCount <= g_iPlayerCount_excludeSpec)
if (ActivePlayerCount <= g_iPlayerCount_excludeSpec && !skip_player_check)
{
return false;
}