Changed all CloseHandle's on timers to KillTimer()
This commit is contained in:
parent
21b29e8bb3
commit
a8a4f4fbb0
|
@ -38,13 +38,13 @@ public Action:RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
|
||||||
|
|
||||||
if (tRound != INVALID_HANDLE)
|
if (tRound != INVALID_HANDLE)
|
||||||
{
|
{
|
||||||
CloseHandle(tRound);
|
KillTimer(tRound);
|
||||||
tRound = INVALID_HANDLE;
|
tRound = INVALID_HANDLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tInfect != INVALID_HANDLE)
|
if (tInfect != INVALID_HANDLE)
|
||||||
{
|
{
|
||||||
CloseHandle(tInfect);
|
KillTimer(tInfect);
|
||||||
tInfect = INVALID_HANDLE;
|
tInfect = INVALID_HANDLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ public Action:RoundFreezeEnd(Handle:event, const String:name[], bool:dontBroadca
|
||||||
|
|
||||||
if (tRound != INVALID_HANDLE)
|
if (tRound != INVALID_HANDLE)
|
||||||
{
|
{
|
||||||
CloseHandle(tRound);
|
KillTimer(tRound);
|
||||||
}
|
}
|
||||||
|
|
||||||
new Float:roundlen = GetConVarFloat(FindConVar("mp_roundtime")) * 60.0;
|
new Float:roundlen = GetConVarFloat(FindConVar("mp_roundtime")) * 60.0;
|
||||||
|
@ -65,7 +65,7 @@ public Action:RoundFreezeEnd(Handle:event, const String:name[], bool:dontBroadca
|
||||||
|
|
||||||
if (tInfect != INVALID_HANDLE)
|
if (tInfect != INVALID_HANDLE)
|
||||||
{
|
{
|
||||||
CloseHandle(tInfect);
|
KillTimer(tInfect);
|
||||||
}
|
}
|
||||||
|
|
||||||
new Float:min = GetConVarFloat(gCvars[CVAR_SPAWN_MIN]);
|
new Float:min = GetConVarFloat(gCvars[CVAR_SPAWN_MIN]);
|
||||||
|
@ -81,13 +81,13 @@ public Action:RoundEnd(Handle:event, const String:name[], bool:dontBroadcast)
|
||||||
{
|
{
|
||||||
if (tRound != INVALID_HANDLE)
|
if (tRound != INVALID_HANDLE)
|
||||||
{
|
{
|
||||||
CloseHandle(tRound);
|
KillTimer(tRound);
|
||||||
tRound = INVALID_HANDLE;
|
tRound = INVALID_HANDLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tInfect != INVALID_HANDLE)
|
if (tInfect != INVALID_HANDLE)
|
||||||
{
|
{
|
||||||
CloseHandle(tInfect);
|
KillTimer(tInfect);
|
||||||
tInfect = INVALID_HANDLE;
|
tInfect = INVALID_HANDLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ public Action:PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
|
||||||
|
|
||||||
if (tHandles[index][x] != INVALID_HANDLE)
|
if (tHandles[index][x] != INVALID_HANDLE)
|
||||||
{
|
{
|
||||||
CloseHandle(tHandles[index][x]);
|
KillTimer(tHandles[index][x]);
|
||||||
tHandles[index][x] = INVALID_HANDLE;
|
tHandles[index][x] = INVALID_HANDLE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -224,7 +224,7 @@ public Action:PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
|
||||||
|
|
||||||
if (tHandles[index][TPROTECT] != INVALID_HANDLE)
|
if (tHandles[index][TPROTECT] != INVALID_HANDLE)
|
||||||
{
|
{
|
||||||
CloseHandle(tHandles[index][TPROTECT]);
|
KillTimer(tHandles[index][TPROTECT]);
|
||||||
}
|
}
|
||||||
|
|
||||||
pTimeLeft[index] = protect;
|
pTimeLeft[index] = protect;
|
||||||
|
|
|
@ -200,7 +200,7 @@ Zombify_Mother(client)
|
||||||
{
|
{
|
||||||
if (tHandles[client][TMOAN] != INVALID_HANDLE)
|
if (tHandles[client][TMOAN] != INVALID_HANDLE)
|
||||||
{
|
{
|
||||||
CloseHandle(tHandles[client][TMOAN]);
|
KillTimer(tHandles[client][TMOAN]);
|
||||||
}
|
}
|
||||||
tHandles[client][TMOAN] = CreateTimer(interval, ZombieMoanTimer, client, TIMER_REPEAT);
|
tHandles[client][TMOAN] = CreateTimer(interval, ZombieMoanTimer, client, TIMER_REPEAT);
|
||||||
}
|
}
|
||||||
|
@ -209,13 +209,13 @@ Zombify_Mother(client)
|
||||||
{
|
{
|
||||||
pProtect[client] = false;
|
pProtect[client] = false;
|
||||||
|
|
||||||
CloseHandle(tHandles[client][TPROTECT]);
|
KillTimer(tHandles[client][TPROTECT]);
|
||||||
tHandles[client][TPROTECT] = INVALID_HANDLE;
|
tHandles[client][TPROTECT] = INVALID_HANDLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tHandles[client][TZHP] != INVALID_HANDLE)
|
if (tHandles[client][TZHP] != INVALID_HANDLE)
|
||||||
{
|
{
|
||||||
CloseHandle(tHandles[client][TZHP]);
|
KillTimer(tHandles[client][TZHP]);
|
||||||
tHandles[client][TZHP] = INVALID_HANDLE;
|
tHandles[client][TZHP] = INVALID_HANDLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -281,7 +281,7 @@ Zombify(client, attacker)
|
||||||
{
|
{
|
||||||
if (tHandles[client][TMOAN] != INVALID_HANDLE)
|
if (tHandles[client][TMOAN] != INVALID_HANDLE)
|
||||||
{
|
{
|
||||||
CloseHandle(tHandles[client][TMOAN]);
|
KillTimer(tHandles[client][TMOAN]);
|
||||||
}
|
}
|
||||||
tHandles[client][TMOAN] = CreateTimer(interval, ZombieMoanTimer, client, TIMER_REPEAT);
|
tHandles[client][TMOAN] = CreateTimer(interval, ZombieMoanTimer, client, TIMER_REPEAT);
|
||||||
}
|
}
|
||||||
|
@ -290,13 +290,13 @@ Zombify(client, attacker)
|
||||||
{
|
{
|
||||||
pProtect[client] = false;
|
pProtect[client] = false;
|
||||||
|
|
||||||
CloseHandle(tHandles[client][TPROTECT]);
|
KillTimer(tHandles[client][TPROTECT]);
|
||||||
tHandles[client][TPROTECT] = INVALID_HANDLE;
|
tHandles[client][TPROTECT] = INVALID_HANDLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tHandles[client][TZHP] != INVALID_HANDLE)
|
if (tHandles[client][TZHP] != INVALID_HANDLE)
|
||||||
{
|
{
|
||||||
CloseHandle(tHandles[client][TZHP]);
|
KillTimer(tHandles[client][TZHP]);
|
||||||
tHandles[client][TZHP] = INVALID_HANDLE;
|
tHandles[client][TZHP] = INVALID_HANDLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user