TeamManager: Remove cvar, use API call.
This commit is contained in:
parent
69589affea
commit
159f9f846c
@ -59,13 +59,10 @@ public void OnMapStart()
|
||||
|
||||
public Action OnWarmupTimer(Handle timer)
|
||||
{
|
||||
ServerCommand("zr_infect_mzombie_countdown 0.0");
|
||||
|
||||
if(g_iMaxWarmup >= g_CVar_sm_warmupmaxtime.IntValue)
|
||||
{
|
||||
g_iMaxWarmup = 0;
|
||||
g_bWarmup = false;
|
||||
ServerCommand("zr_infect_mzombie_countdown 1.0");
|
||||
CS_TerminateRound(3.0, CSRoundEnd_GameStart, false);
|
||||
return Plugin_Stop;
|
||||
}
|
||||
@ -74,7 +71,6 @@ public Action OnWarmupTimer(Handle timer)
|
||||
{
|
||||
g_iWarmup = 0;
|
||||
g_bWarmup = false;
|
||||
ServerCommand("zr_infect_mzombie_countdown 1.0");
|
||||
CS_TerminateRound(3.0, CSRoundEnd_GameStart, false);
|
||||
return Plugin_Stop;
|
||||
}
|
||||
@ -223,3 +219,11 @@ public Action ZR_OnClientInfect(int &client, int &attacker, bool &motherInfect,
|
||||
|
||||
return Plugin_Continue;
|
||||
}
|
||||
|
||||
public Action ZR_OnInfectCountdown()
|
||||
{
|
||||
if(g_bWarmup)
|
||||
return Plugin_Handled;
|
||||
|
||||
return Plugin_Continue;
|
||||
}
|
||||
|
@ -74,6 +74,14 @@ native int ZR_InfectClient(int client, int attacker = -1, bool motherInfect = fa
|
||||
*/
|
||||
native int ZR_HumanClient(int client, bool respawn = false, bool protect = false);
|
||||
|
||||
/**
|
||||
* Called on infection timer to determine if timer should show.
|
||||
*
|
||||
* @return Plugin_Continue to allow timer. Anything else
|
||||
* (Like Plugin_Handled) to block timer.
|
||||
*/
|
||||
forward Action ZR_OnInfectCountdown();
|
||||
|
||||
/**
|
||||
* Called when a player is about to become a zombie.
|
||||
* Here you can modify any variable or block the infection entirely.
|
||||
|
Loading…
Reference in New Issue
Block a user