plugins/mapmanager/globals.sp
changeset 1952 b7aa2b626807
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/plugins/mapmanager/globals.sp	Sun Mar 30 07:00:22 2008 +0000
     1.3 @@ -0,0 +1,104 @@
     1.4 +/**
     1.5 + * vim: set ts=4 :
     1.6 + * =============================================================================
     1.7 + * SourceMod Map Manager Plugin
     1.8 + * Contains globals and defines
     1.9 + *
    1.10 + * SourceMod (C)2004-2008 AlliedModders LLC.  All rights reserved.
    1.11 + * =============================================================================
    1.12 + *
    1.13 + * This program is free software; you can redistribute it and/or modify it under
    1.14 + * the terms of the GNU General Public License, version 3.0, as published by the
    1.15 + * Free Software Foundation.
    1.16 + * 
    1.17 + * This program is distributed in the hope that it will be useful, but WITHOUT
    1.18 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    1.19 + * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
    1.20 + * details.
    1.21 + *
    1.22 + * You should have received a copy of the GNU General Public License along with
    1.23 + * this program.  If not, see <http://www.gnu.org/licenses/>.
    1.24 + *
    1.25 + * As a special exception, AlliedModders LLC gives you permission to link the
    1.26 + * code of this program (as well as its derivative works) to "Half-Life 2," the
    1.27 + * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
    1.28 + * by the Valve Corporation.  You must obey the GNU General Public License in
    1.29 + * all respects for all other code used.  Additionally, AlliedModders LLC grants
    1.30 + * this exception to all derivative works.  AlliedModders LLC defines further
    1.31 + * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
    1.32 + * or <http://www.sourcemod.net/license.php>.
    1.33 + *
    1.34 + * Version: $Id$
    1.35 + */
    1.36 +
    1.37 +#define VOTE_EXTEND "##extend##"
    1.38 +#define VOTE_YES "###yes###"
    1.39 +#define VOTE_NO "###no###"
    1.40 +
    1.41 +new Handle:hTopMenu = INVALID_HANDLE;			// TopMenu
    1.42 +
    1.43 +new Handle:g_MapCycle = INVALID_HANDLE;			// mapcyclefile maps
    1.44 +new Handle:g_MapList = INVALID_HANDLE;			// maplist.txt maps
    1.45 +new Handle:g_MapHistory = INVALID_HANDLE;		// History of maps played
    1.46 +new Handle:g_NextVoteMaps = INVALID_HANDLE;		// Array of maps for next RTV or MC vote
    1.47 +new Handle:g_NominatedMaps = INVALID_HANDLE;	// Array of maps that have been nominated
    1.48 +
    1.49 +new Handle:g_Menu_Map = INVALID_HANDLE;			// Menu of maps used by sm_map in admin menu
    1.50 +new Handle:g_Menu_Votemap = INVALID_HANDLE;		// Menu of maps used by sm_votemap in admin menu
    1.51 +new Handle:g_Menu_Nominate = INVALID_HANDLE;		// Menu of maps used by Nomination system
    1.52 +
    1.53 +new Handle:g_SelectedMaps;						// List of maps chosen so far by a user in sm_votemap admin menu
    1.54 +new g_VoteMapInUse;								// Client index of admin using sm_votemap
    1.55 +new String:g_Client_Data[MAXCLIENTS+1][64]; 	// Used to hold bits of client data during sm_votemap
    1.56 +
    1.57 +new bool:g_MapChangeSet;						// True if a command or vote has set the map
    1.58 +new bool:g_MapChanged;							// True if a map change has been issued
    1.59 +new g_MapChangeWhen;							// Either 'i' for immediate, 'r' for round end, or 'e' for end of map.
    1.60 +
    1.61 +new UserMsg:g_VGUIMenu;							// VGUI usermsg id for nextmap
    1.62 +new bool:g_NextMapEnabled = true				// If set to false, all features requiring nextmap are disabled.
    1.63 +new bool:g_IntermissionCalled;					// Has the end of map intermission begun?
    1.64 +new String:g_NextMap[64];						// All important! This is the next map!
    1.65 +new g_MapPos = -1;								// Position in mapcycle
    1.66 +
    1.67 +new bool:g_RTV_Voted[MAXPLAYERS+1] = {false, ...};	// Whether or not a player has voted for RTV
    1.68 +new bool:g_RTV_Allowed = false;					// True if RTV is available to players. Used to delay rtv votes.
    1.69 +new bool:g_RTV_Started = false;					// Indicates that the actual map vote has started
    1.70 +new bool:g_RTV_Ended = false;					// Indicates that the actual map vote has concluded
    1.71 +new g_RTV_Voters = 0;							// Total voters connected. Doesn't include fake clients.
    1.72 +new g_RTV_Votes = 0;							// Total number of "say rtv" votes
    1.73 +new g_RTV_VotesNeeded = 0;						// Necessary votes before map vote begins. (voters * percent_needed)
    1.74 +
    1.75 +new bool:g_Nominated[MAXPLAYERS+1] = {false, ...};	// Whether or not a player has nominated a map
    1.76 +
    1.77 +new Handle:g_TeamScores = INVALID_HANDLE;		// Array of team scores
    1.78 +new g_TotalRounds;								// Total rounds played this map
    1.79 +new bool:g_HasVoteStarted;						// Whether or not MapChooser has begun
    1.80 +
    1.81 +// ConVar handles
    1.82 +new Handle:g_Cvar_NextMap = INVALID_HANDLE;
    1.83 +new Handle:g_Cvar_VoteMap = INVALID_HANDLE;
    1.84 +new Handle:g_Cvar_Excludes = INVALID_HANDLE;
    1.85 +new Handle:g_Cvar_StartTime = INVALID_HANDLE;
    1.86 +new Handle:g_Cvar_StartRounds = INVALID_HANDLE;
    1.87 +new Handle:g_Cvar_StartFrags = INVALID_HANDLE;
    1.88 +new Handle:g_Cvar_ExtendTimeMax = INVALID_HANDLE;
    1.89 +new Handle:g_Cvar_ExtendTimeStep = INVALID_HANDLE;
    1.90 +new Handle:g_Cvar_ExtendRoundMax = INVALID_HANDLE;
    1.91 +new Handle:g_Cvar_ExtendRoundStep = INVALID_HANDLE;
    1.92 +new Handle:g_Cvar_ExtendFragMax = INVALID_HANDLE;
    1.93 +new Handle:g_Cvar_ExtendFragStep = INVALID_HANDLE;
    1.94 +new Handle:g_Cvar_Mapfile = INVALID_HANDLE;
    1.95 +new Handle:g_Cvar_ExcludeMaps = INVALID_HANDLE;
    1.96 +new Handle:g_Cvar_IncludeMaps = INVALID_HANDLE;
    1.97 +new Handle:g_Cvar_NoVoteMode = INVALID_HANDLE;
    1.98 +new Handle:g_Cvar_Extend = INVALID_HANDLE;
    1.99 +
   1.100 +new Handle:g_VoteTimer = INVALID_HANDLE;
   1.101 +new Handle:g_RetryTimer = INVALID_HANDLE;
   1.102 +
   1.103 +// VALVe ConVars
   1.104 +new Handle:g_Cvar_Chattime = INVALID_HANDLE;
   1.105 +new Handle:g_Cvar_Winlimit = INVALID_HANDLE;
   1.106 +new Handle:g_Cvar_Maxrounds = INVALID_HANDLE;
   1.107 +new Handle:g_Cvar_Fraglimit = INVALID_HANDLE;