Small cleanup in infect countdown timers.

This commit is contained in:
Richard Helgeby 2012-05-20 21:08:07 +02:00
parent 235407facb
commit 1a4951ad0c

View File

@ -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;
} }