Backed out changeset: f38675c67f64 (bug 5484).
This commit is contained in:
parent
e3d2ddf278
commit
a01768525a
@ -61,7 +61,6 @@ new Handle:g_Cvar_Winlimit = INVALID_HANDLE;
|
|||||||
new Handle:g_Cvar_Maxrounds = INVALID_HANDLE;
|
new Handle:g_Cvar_Maxrounds = INVALID_HANDLE;
|
||||||
new Handle:g_Cvar_Fraglimit = INVALID_HANDLE;
|
new Handle:g_Cvar_Fraglimit = INVALID_HANDLE;
|
||||||
new Handle:g_Cvar_Bonusroundtime = INVALID_HANDLE;
|
new Handle:g_Cvar_Bonusroundtime = INVALID_HANDLE;
|
||||||
new Handle:g_Cvar_MatchClinch = INVALID_HANDLE;
|
|
||||||
|
|
||||||
/* Plugin ConVars */
|
/* Plugin ConVars */
|
||||||
new Handle:g_Cvar_StartTime = INVALID_HANDLE;
|
new Handle:g_Cvar_StartTime = INVALID_HANDLE;
|
||||||
@ -98,7 +97,6 @@ new bool:g_WaitingForVote;
|
|||||||
new bool:g_MapVoteCompleted;
|
new bool:g_MapVoteCompleted;
|
||||||
new bool:g_ChangeMapAtRoundEnd;
|
new bool:g_ChangeMapAtRoundEnd;
|
||||||
new bool:g_ChangeMapInProgress;
|
new bool:g_ChangeMapInProgress;
|
||||||
new bool:g_HasIntermissionStarted = false;
|
|
||||||
new g_mapFileSerial = -1;
|
new g_mapFileSerial = -1;
|
||||||
|
|
||||||
new g_NominateCount = 0;
|
new g_NominateCount = 0;
|
||||||
@ -150,7 +148,6 @@ public OnPluginStart()
|
|||||||
g_Cvar_Maxrounds = FindConVar("mp_maxrounds");
|
g_Cvar_Maxrounds = FindConVar("mp_maxrounds");
|
||||||
g_Cvar_Fraglimit = FindConVar("mp_fraglimit");
|
g_Cvar_Fraglimit = FindConVar("mp_fraglimit");
|
||||||
g_Cvar_Bonusroundtime = FindConVar("mp_bonusroundtime");
|
g_Cvar_Bonusroundtime = FindConVar("mp_bonusroundtime");
|
||||||
g_Cvar_MatchClinch = FindConVar("mp_match_can_clinch");
|
|
||||||
|
|
||||||
if (g_Cvar_Winlimit != INVALID_HANDLE || g_Cvar_Maxrounds != INVALID_HANDLE)
|
if (g_Cvar_Winlimit != INVALID_HANDLE || g_Cvar_Maxrounds != INVALID_HANDLE)
|
||||||
{
|
{
|
||||||
@ -167,12 +164,6 @@ public OnPluginStart()
|
|||||||
{
|
{
|
||||||
HookEvent("round_win", Event_RoundEnd);
|
HookEvent("round_win", Event_RoundEnd);
|
||||||
}
|
}
|
||||||
else if (strcmp(folder, "csgo") == 0)
|
|
||||||
{
|
|
||||||
HookEvent("round_end", Event_RoundEnd);
|
|
||||||
HookEvent("cs_intermission", Event_Intermission);
|
|
||||||
HookEvent("announce_phase_end", Event_PhaseEnd);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
HookEvent("round_end", Event_RoundEnd);
|
HookEvent("round_end", Event_RoundEnd);
|
||||||
@ -264,7 +255,6 @@ public OnMapEnd()
|
|||||||
g_WaitingForVote = false;
|
g_WaitingForVote = false;
|
||||||
g_ChangeMapAtRoundEnd = false;
|
g_ChangeMapAtRoundEnd = false;
|
||||||
g_ChangeMapInProgress = false;
|
g_ChangeMapInProgress = false;
|
||||||
g_HasIntermissionStarted = false;
|
|
||||||
|
|
||||||
g_VoteTimer = INVALID_HANDLE;
|
g_VoteTimer = INVALID_HANDLE;
|
||||||
g_RetryTimer = INVALID_HANDLE;
|
g_RetryTimer = INVALID_HANDLE;
|
||||||
@ -434,26 +424,6 @@ public Event_TeamPlayWinPanel(Handle:event, const String:name[], bool:dontBroadc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Event_Intermission(Handle:event, const String:name[], bool:dontBroadcast)
|
|
||||||
{
|
|
||||||
g_HasIntermissionStarted = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Event_PhaseEnd(Handle:event, const String:name[], bool:dontBroadcast)
|
|
||||||
{
|
|
||||||
/* announce_phase_end fires for both half time and the end of the map, but intermission fires first for end of the map. */
|
|
||||||
if (g_HasIntermissionStarted)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* No intermission yet, so this must be half time. Swap the score counters. */
|
|
||||||
new t_score = g_winCount[2];
|
|
||||||
g_winCount[2] = g_winCount[3];
|
|
||||||
g_winCount[3] = t_score;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* You ask, why don't you just use team_score event? And I answer... Because CSS doesn't. */
|
/* You ask, why don't you just use team_score event? And I answer... Because CSS doesn't. */
|
||||||
public Event_RoundEnd(Handle:event, const String:name[], bool:dontBroadcast)
|
public Event_RoundEnd(Handle:event, const String:name[], bool:dontBroadcast)
|
||||||
{
|
{
|
||||||
@ -511,22 +481,6 @@ public CheckWinLimit(winner_score)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_Cvar_MatchClinch != INVALID_HANDLE && g_Cvar_Maxrounds != INVALID_HANDLE)
|
|
||||||
{
|
|
||||||
new clinch = GetConVarInt(g_Cvar_MatchClinch);
|
|
||||||
|
|
||||||
if (clinch)
|
|
||||||
{
|
|
||||||
new maxrounds = GetConVarInt(g_Cvar_Maxrounds);
|
|
||||||
new winlimit = maxrounds / 2;
|
|
||||||
|
|
||||||
if(winner_score > (winlimit - GetConVarInt(g_Cvar_StartRounds)))
|
|
||||||
{
|
|
||||||
InitiateVote(MapChange_MapEnd, INVALID_HANDLE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public CheckMaxRounds(roundcount)
|
public CheckMaxRounds(roundcount)
|
||||||
|
Loading…
Reference in New Issue
Block a user