Small timer fixes. Added cvar zr_roundend_balance_teams. See details.
Added cvar for disabling team balancing on round end (for use with custom team balancer): zr_roundend_balance_teams. Disabling this will cause players to remain on their current team when a new round starts. If zombies win, everyone will remain on the terrorists team. Fixed invalid handle error after a map change. Fixed language code typo in translations. Infection countdown is no longer displayed if the infection delay is just one second.
This commit is contained in:
@ -78,9 +78,10 @@ new bool:bInfectImmune[MAXPLAYERS + 1][2];
|
||||
*/
|
||||
InfectOnMapStart()
|
||||
{
|
||||
// Stop timers if running.
|
||||
ZREndTimer(tInfect);
|
||||
ZREndTimer(tInfectCountdown);
|
||||
// Reset timer handles. Infect timers are invalidated on a map change if
|
||||
// they are still running, so these handles no longer point to valid timers.
|
||||
tInfect = INVALID_HANDLE;
|
||||
tInfectCountdown = INVALID_HANDLE;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -378,7 +379,7 @@ InfectOnRoundFreezeEnd()
|
||||
|
||||
// Check cvar and start a countdown timer if enabled.
|
||||
new bool:countdown = GetConVarBool(g_hCvarsList[CVAR_INFECT_MZOMBIE_COUNTDOWN]);
|
||||
if (countdown)
|
||||
if (countdown && randomtime > 1.0)
|
||||
{
|
||||
// Store the time until infection, and initialize the counter.
|
||||
new Handle:hCountdownData = CreateDataPack();
|
||||
|
Reference in New Issue
Block a user