ds@1952: /** ds@1952: * vim: set ts=4 : ds@1952: * ============================================================================= ds@1952: * SourceMod Map Manager Plugin ds@1952: * Contains globals and defines ds@1952: * ds@1952: * SourceMod (C)2004-2008 AlliedModders LLC. All rights reserved. ds@1952: * ============================================================================= ds@1952: * ds@1952: * This program is free software; you can redistribute it and/or modify it under ds@1952: * the terms of the GNU General Public License, version 3.0, as published by the ds@1952: * Free Software Foundation. ds@1952: * ds@1952: * This program is distributed in the hope that it will be useful, but WITHOUT ds@1952: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS ds@1952: * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more ds@1952: * details. ds@1952: * ds@1952: * You should have received a copy of the GNU General Public License along with ds@1952: * this program. If not, see . ds@1952: * ds@1952: * As a special exception, AlliedModders LLC gives you permission to link the ds@1952: * code of this program (as well as its derivative works) to "Half-Life 2," the ds@1952: * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software ds@1952: * by the Valve Corporation. You must obey the GNU General Public License in ds@1952: * all respects for all other code used. Additionally, AlliedModders LLC grants ds@1952: * this exception to all derivative works. AlliedModders LLC defines further ds@1952: * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), ds@1952: * or . ds@1952: * ds@1952: * Version: $Id$ ds@1952: */ ds@1952: ds@1952: #define VOTE_EXTEND "##extend##" ds@1952: #define VOTE_YES "###yes###" ds@1952: #define VOTE_NO "###no###" ds@1952: ds@1952: new Handle:hTopMenu = INVALID_HANDLE; // TopMenu ds@1952: ds@1952: new Handle:g_MapCycle = INVALID_HANDLE; // mapcyclefile maps ds@1952: new Handle:g_MapList = INVALID_HANDLE; // maplist.txt maps ds@1952: new Handle:g_MapHistory = INVALID_HANDLE; // History of maps played ds@1952: new Handle:g_NextVoteMaps = INVALID_HANDLE; // Array of maps for next RTV or MC vote ds@1952: new Handle:g_NominatedMaps = INVALID_HANDLE; // Array of maps that have been nominated ds@1952: ds@1952: new Handle:g_Menu_Map = INVALID_HANDLE; // Menu of maps used by sm_map in admin menu ds@1952: new Handle:g_Menu_Votemap = INVALID_HANDLE; // Menu of maps used by sm_votemap in admin menu ds@1952: new Handle:g_Menu_Nominate = INVALID_HANDLE; // Menu of maps used by Nomination system ds@1952: ds@1952: new Handle:g_SelectedMaps; // List of maps chosen so far by a user in sm_votemap admin menu ds@1952: new g_VoteMapInUse; // Client index of admin using sm_votemap ds@1952: new String:g_Client_Data[MAXCLIENTS+1][64]; // Used to hold bits of client data during sm_votemap ds@1952: ds@1952: new bool:g_MapChangeSet; // True if a command or vote has set the map ds@1952: new bool:g_MapChanged; // True if a map change has been issued ds@1952: new g_MapChangeWhen; // Either 'i' for immediate, 'r' for round end, or 'e' for end of map. ds@1952: ds@1952: new UserMsg:g_VGUIMenu; // VGUI usermsg id for nextmap ds@1952: new bool:g_NextMapEnabled = true // If set to false, all features requiring nextmap are disabled. ds@1952: new bool:g_IntermissionCalled; // Has the end of map intermission begun? ds@1952: new String:g_NextMap[64]; // All important! This is the next map! ds@1952: new g_MapPos = -1; // Position in mapcycle ds@1952: ds@1952: new bool:g_RTV_Voted[MAXPLAYERS+1] = {false, ...}; // Whether or not a player has voted for RTV ds@1952: new bool:g_RTV_Allowed = false; // True if RTV is available to players. Used to delay rtv votes. ds@1952: new bool:g_RTV_Started = false; // Indicates that the actual map vote has started ds@1952: new bool:g_RTV_Ended = false; // Indicates that the actual map vote has concluded ds@1952: new g_RTV_Voters = 0; // Total voters connected. Doesn't include fake clients. ds@1952: new g_RTV_Votes = 0; // Total number of "say rtv" votes ds@1952: new g_RTV_VotesNeeded = 0; // Necessary votes before map vote begins. (voters * percent_needed) ds@1952: ds@1952: new bool:g_Nominated[MAXPLAYERS+1] = {false, ...}; // Whether or not a player has nominated a map ds@1952: ds@1952: new Handle:g_TeamScores = INVALID_HANDLE; // Array of team scores ds@1952: new g_TotalRounds; // Total rounds played this map ds@1952: new bool:g_HasVoteStarted; // Whether or not MapChooser has begun ds@1952: ds@1952: // ConVar handles ds@1952: new Handle:g_Cvar_NextMap = INVALID_HANDLE; ds@1952: new Handle:g_Cvar_VoteMap = INVALID_HANDLE; ds@1952: new Handle:g_Cvar_Excludes = INVALID_HANDLE; ds@1952: new Handle:g_Cvar_StartTime = INVALID_HANDLE; ds@1952: new Handle:g_Cvar_StartRounds = INVALID_HANDLE; ds@1952: new Handle:g_Cvar_StartFrags = INVALID_HANDLE; ds@1952: new Handle:g_Cvar_ExtendTimeMax = INVALID_HANDLE; ds@1952: new Handle:g_Cvar_ExtendTimeStep = INVALID_HANDLE; ds@1952: new Handle:g_Cvar_ExtendRoundMax = INVALID_HANDLE; ds@1952: new Handle:g_Cvar_ExtendRoundStep = INVALID_HANDLE; ds@1952: new Handle:g_Cvar_ExtendFragMax = INVALID_HANDLE; ds@1952: new Handle:g_Cvar_ExtendFragStep = INVALID_HANDLE; ds@1952: new Handle:g_Cvar_Mapfile = INVALID_HANDLE; ds@1952: new Handle:g_Cvar_ExcludeMaps = INVALID_HANDLE; ds@1952: new Handle:g_Cvar_IncludeMaps = INVALID_HANDLE; ds@1952: new Handle:g_Cvar_NoVoteMode = INVALID_HANDLE; ds@1952: new Handle:g_Cvar_Extend = INVALID_HANDLE; ds@1952: ds@1952: new Handle:g_VoteTimer = INVALID_HANDLE; ds@1952: new Handle:g_RetryTimer = INVALID_HANDLE; ds@1952: ds@1952: // VALVe ConVars ds@1952: new Handle:g_Cvar_Chattime = INVALID_HANDLE; ds@1952: new Handle:g_Cvar_Winlimit = INVALID_HANDLE; ds@1952: new Handle:g_Cvar_Maxrounds = INVALID_HANDLE; ds@1952: new Handle:g_Cvar_Fraglimit = INVALID_HANDLE;