55#endif
66
77# define PLUGIN " Map Manager"
8- # define VERSION " 2.5.57 "
8+ # define VERSION " 2.5.58 "
99# define AUTHOR " Mistrick"
1010
1111#pragma semicolon 1
1515# define FUNCTION_NEXTMAP // replace default nextmap
1616# define FUNCTION_RTV
1717# define FUNCTION_NOMINATION
18- // #define FUNCTION_NIGHTMODE
18+ # define FUNCTION_NIGHTMODE
1919# define FUNCTION_NIGHTMODE_BLOCK_CMDS
2020# define FUNCTION_BLOCK_MAPS
2121# define FUNCTION_SOUND
@@ -1154,6 +1154,11 @@ public DelayedChange()
11541154#endif
11551155public Event_NewRound ()
11561156{
1157+ if (g_bVoteStarted || g_bVoteFinished)
1158+ {
1159+ return ;
1160+ }
1161+
11571162 new iMaxRounds = get_pcvar_num (g_pCvars[MAXROUNDS]);
11581163 if (! g_bVoteFinished && iMaxRounds && (g_iTeamScore[0 ] + g_iTeamScore[1 ]) >= iMaxRounds - 2 )
11591164 {
@@ -1250,8 +1255,7 @@ public Task_CheckNight()
12501255 get_int_time (szStart, iStartHour, iStartMinutes);
12511256 get_int_time (szEnd, iEndHour, iEndMinutes);
12521257
1253- get_time (" % H:% M" , szTime, charsmax (szTime));
1254- new iCurHour, iCurMinutes; get_int_time (szTime, iCurHour, iCurMinutes);
1258+ new iCurHour, iCurMinutes; time (iCurHour, iCurMinutes);
12551259
12561260 new bOldNightMode = g_bNightMode;
12571261
@@ -1343,6 +1347,7 @@ public StartVote(id)
13431347 g_bStartVote = false ;
13441348
13451349 ResetInfo ();
1350+ CheckAllowExtendMap ();
13461351
13471352 #if defined FUNCTION_NIGHTMODE
13481353 if (g_bNightMode)
@@ -1460,6 +1465,14 @@ public StartVote(id)
14601465 }
14611466 }
14621467
1468+ ArrayDestroy (aMaps);
1469+
1470+ ForwardPreStartVote ();
1471+
1472+ return 0 ;
1473+ }
1474+ CheckAllowExtendMap ()
1475+ {
14631476 new bAllow = get_pcvar_num (g_pCvars[EXTENDED_TYPE]) == 1 && (get_pcvar_num (g_pCvars[MAXROUNDS]) || get_pcvar_num (g_pCvars[WINLIMIT]));
14641477
14651478 #if defined FUNCTION_RTV && defined FUNCTION_NIGHTMODE
@@ -1482,12 +1495,6 @@ public StartVote(id)
14821495 {
14831496 g_bExtendMap = false ;
14841497 }
1485-
1486- ArrayDestroy (aMaps);
1487-
1488- ForwardPreStartVote ();
1489-
1490- return 0 ;
14911498}
14921499ResetInfo ()
14931500{
0 commit comments