Small cleanup in infect countdown timers.
This commit is contained in:
parent
235407facb
commit
1a4951ad0c
|
@ -397,15 +397,9 @@ InfectOnRoundFreezeEnd()
|
||||||
*/
|
*/
|
||||||
InfectOnRoundEnd()
|
InfectOnRoundEnd()
|
||||||
{
|
{
|
||||||
// If infect timer is running, then kill it.
|
// Stop infect timers if running.
|
||||||
if (tInfect != INVALID_HANDLE)
|
ZREndTimer(tInfect);
|
||||||
{
|
ZREndTimer(tInfectCountdown);
|
||||||
// Kill timer.
|
|
||||||
KillTimer(tInfect);
|
|
||||||
|
|
||||||
// Reset timer handle.
|
|
||||||
tInfect = INVALID_HANDLE;
|
|
||||||
}
|
|
||||||
|
|
||||||
// x = client index.
|
// x = client index.
|
||||||
for (new x = 1; x <= MaxClients; x++)
|
for (new x = 1; x <= MaxClients; x++)
|
||||||
|
@ -590,7 +584,7 @@ public Action:InfectCountdown(Handle:timer, Handle:hCountdownData)
|
||||||
if (counter >= length)
|
if (counter >= length)
|
||||||
{
|
{
|
||||||
// Kill timer.
|
// Kill timer.
|
||||||
ZREndTimer(tInfectCountdown, false);
|
ZREndTimer(tInfectCountdown);
|
||||||
CloseHandle(hCountdownData);
|
CloseHandle(hCountdownData);
|
||||||
return Plugin_Stop;
|
return Plugin_Stop;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user