Couple of small mapchooser tweaks

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402477
This commit is contained in:
Matt Woodrow 2008-08-27 01:45:10 +00:00
parent bf5ee181fa
commit 05c8681336

View File

@ -123,7 +123,7 @@ public OnPluginStart()
g_Cvar_NoVoteMode = CreateConVar("sm_mapvote_novote", "1", "Specifies whether or not MapChooser should pick a map if no votes are received.", _, true, 0.0, true, 1.0);
g_Cvar_Extend = CreateConVar("sm_mapvote_extend", "0", "Number of extensions allowed each map.", _, true, 0.0);
g_Cvar_DontChange = CreateConVar("sm_mapvote_dontchange", "1", "Specifies if a 'Don't Change' option should be added to early votes", _, true, 0.0);
g_Cvar_VoteDuration = CreateConVar("sm_mapvote_voteduration", "20", "Specifies how long the mapvote should be available for.", _, true, 5.0, true, 25.0);
g_Cvar_VoteDuration = CreateConVar("sm_mapvote_voteduration", "20", "Specifies how long the mapvote should be available for.", _, true, 5.0);
RegAdminCmd("sm_mapvote", Command_Mapvote, ADMFLAG_CHANGEMAP, "sm_mapvote - Forces MapChooser to attempt to run a map vote now.");
RegAdminCmd("sm_setnextmap", Command_SetNextmap, ADMFLAG_CHANGEMAP, "sm_setnextmap <map>");
@ -355,13 +355,14 @@ public Event_TeamPlayWinPanel(Handle:event, const String:name[], bool:dontBroadc
if(GetEventInt(event, "round_complete") == 1 || StrEqual(name, "arena_win_panel"))
{
g_TotalRounds++;
CheckMaxRounds(g_TotalRounds);
if (!GetArraySize(g_MapList) || g_HasVoteStarted || g_MapVoteCompleted || !GetConVarBool(g_Cvar_EndOfMapVote))
{
return;
}
CheckMaxRounds(g_TotalRounds);
switch(GetEventInt(event, "winning_team"))
{
case 3: