Moved mapchooser tf2 fix into trunk
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402112
This commit is contained in:
parent
5c6a2868d9
commit
394424c52f
@ -5,7 +5,7 @@
|
|||||||
* Creates a map vote at appropriate times, setting sm_nextmap to the winning
|
* Creates a map vote at appropriate times, setting sm_nextmap to the winning
|
||||||
* vote
|
* vote
|
||||||
*
|
*
|
||||||
* SourceMod (C)2004-2008 AlliedModders LLC. All rights reserved.
|
* SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
|
||||||
* =============================================================================
|
* =============================================================================
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it under
|
* This program is free software; you can redistribute it and/or modify it under
|
||||||
@ -106,6 +106,7 @@ public OnPluginStart()
|
|||||||
if (g_Cvar_Winlimit != INVALID_HANDLE || g_Cvar_Maxrounds != INVALID_HANDLE)
|
if (g_Cvar_Winlimit != INVALID_HANDLE || g_Cvar_Maxrounds != INVALID_HANDLE)
|
||||||
{
|
{
|
||||||
HookEvent("round_end", Event_RoundEnd);
|
HookEvent("round_end", Event_RoundEnd);
|
||||||
|
HookEventEx("teamplay_round_win", Event_TeamPlayRoundWin);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_Cvar_Fraglimit != INVALID_HANDLE)
|
if (g_Cvar_Fraglimit != INVALID_HANDLE)
|
||||||
@ -223,6 +224,16 @@ public Action:Timer_StartMapVote(Handle:timer)
|
|||||||
return Plugin_Stop;
|
return Plugin_Stop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Event_TeamPlayRoundWin(Handle:event, const String:name[], bool:dontBroadcast)
|
||||||
|
{
|
||||||
|
new isFull = GetEventInt(event, "full_round");
|
||||||
|
new winningTeam = GetEventInt(event, "team");
|
||||||
|
|
||||||
|
if (isFull == 1)
|
||||||
|
{
|
||||||
|
RoundCompleted(winningTeam);
|
||||||
|
}
|
||||||
|
}
|
||||||
/* 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)
|
||||||
{
|
{
|
||||||
@ -233,6 +244,11 @@ public Event_RoundEnd(Handle:event, const String:name[], bool:dontBroadcast)
|
|||||||
|
|
||||||
new winner = GetEventInt(event, "winner");
|
new winner = GetEventInt(event, "winner");
|
||||||
|
|
||||||
|
RoundCompleted(winner);
|
||||||
|
}
|
||||||
|
|
||||||
|
public RoundCompleted(winner)
|
||||||
|
{
|
||||||
if (winner == 0 || winner == 1)
|
if (winner == 0 || winner == 1)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user