# HG changeset patch # User Matt Woodrow # Date 1221963601 -43200 # Node ID 5ce2188ebe3690754469ecb987a67c7c85367ba3 # Parent 96b2aa64513e3927eafaa5b32b384860b38e11c1 Updated randomcycle to use the Nextmap API diff -r 96b2aa64513e -r 5ce2188ebe36 plugins/randomcycle.sp --- a/plugins/randomcycle.sp Thu Sep 18 18:42:13 2008 +1200 +++ b/plugins/randomcycle.sp Sun Sep 21 14:20:01 2008 +1200 @@ -43,7 +43,6 @@ url = "http://www.sourcemod.net/" }; -new Handle:g_Cvar_Nextmap = INVALID_HANDLE; new Handle:g_Cvar_ExcludeMaps = INVALID_HANDLE; new Handle:g_MapList = INVALID_HANDLE; @@ -63,14 +62,6 @@ public OnConfigsExecuted() { - g_Cvar_Nextmap = FindConVar("sm_nextmap"); - - if (g_Cvar_Nextmap == INVALID_HANDLE) - { - LogError("FATAL: Cannot find sm_nextmap cvar. RandomCycle not loaded."); - SetFailState("sm_nextmap not found"); - } - if (ReadMapList(g_MapList, g_mapListSerial, "randomcycle", @@ -105,8 +96,8 @@ GetArrayString(g_MapList, b, map, sizeof(map)); } - SetConVarString(g_Cvar_Nextmap, map); PushArrayString(g_OldMapList, map); + SetNextMap(map); if (GetArraySize(g_OldMapList) > GetConVarInt(g_Cvar_ExcludeMaps)) {