Port randomcycle.
This commit is contained in:
parent
86d4cdc0c4
commit
d68eea6dea
@ -43,7 +43,7 @@ public Plugin:myinfo =
|
|||||||
url = "http://www.sourcemod.net/"
|
url = "http://www.sourcemod.net/"
|
||||||
};
|
};
|
||||||
|
|
||||||
new Handle:g_Cvar_ExcludeMaps = INVALID_HANDLE;
|
ConVar g_Cvar_ExcludeMaps;
|
||||||
|
|
||||||
new Handle:g_MapList = INVALID_HANDLE;
|
new Handle:g_MapList = INVALID_HANDLE;
|
||||||
new Handle:g_OldMapList = INVALID_HANDLE;
|
new Handle:g_OldMapList = INVALID_HANDLE;
|
||||||
@ -82,7 +82,7 @@ public Action:Timer_RandomizeNextmap(Handle:timer)
|
|||||||
decl String:map[32];
|
decl String:map[32];
|
||||||
|
|
||||||
new bool:oldMaps = false;
|
new bool:oldMaps = false;
|
||||||
if (GetConVarInt(g_Cvar_ExcludeMaps) && GetArraySize(g_MapList) > GetConVarInt(g_Cvar_ExcludeMaps))
|
if (g_Cvar_ExcludeMaps.IntValue && GetArraySize(g_MapList) > g_Cvar_ExcludeMaps.IntValue)
|
||||||
{
|
{
|
||||||
oldMaps = true;
|
oldMaps = true;
|
||||||
}
|
}
|
||||||
@ -99,7 +99,7 @@ public Action:Timer_RandomizeNextmap(Handle:timer)
|
|||||||
PushArrayString(g_OldMapList, map);
|
PushArrayString(g_OldMapList, map);
|
||||||
SetNextMap(map);
|
SetNextMap(map);
|
||||||
|
|
||||||
if (GetArraySize(g_OldMapList) > GetConVarInt(g_Cvar_ExcludeMaps))
|
if (GetArraySize(g_OldMapList) > g_Cvar_ExcludeMaps.IntValue)
|
||||||
{
|
{
|
||||||
RemoveFromArray(g_OldMapList, 0);
|
RemoveFromArray(g_OldMapList, 0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user