zspawn confirmed fixed. Added debug messages on OnClientDisconnect and PlayerDeath.

This commit is contained in:
richard 2008-11-12 16:01:50 +01:00
parent 4335828d3d
commit 70ea880d11
3 changed files with 21 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2008.11.11 - 2.5.1.11 - Richard
* zspawn confirmed fixed.
* Added debug messages on OnPlayerDisconnect and PlayerDeath. (zr_debug must be 2, might spam the console).
2008.10.29 - 2.5.1.10 - Richard
* Improved handling of invalid handle errors on OnClientDisconnect and PlayerDeath.
CloseHandle sometimes cause errors when destroying timers. Solution: KillTimer.

View File

@ -15,7 +15,7 @@
#undef REQUIRE_PLUGIN
#include <market>
#define VERSION "2.5.1.10"
#define VERSION "2.5.1.11"
#include "zr/zombiereloaded"
#include "zr/global"
@ -179,10 +179,18 @@ public OnClientDisconnect(client)
PlayerLeft(client);
new debug_val = GetConVarInt(gCvars[CVAR_DEBUG]);
new String:debug_msg[64];
for (new x = 0; x < MAXTIMERS; x++)
{
if (tHandles[client][x] != INVALID_HANDLE)
{
if (debug_val > 1)
{
Format(debug_msg, sizeof(debug_msg), "PlayerDeath - Killing timer %i with handle %x.", x, tHandles[client][x]);
ZR_DebugPrintToConsole(0, debug_msg);
}
KillTimer(tHandles[client][x]);
tHandles[client][x] = INVALID_HANDLE;
}

View File

@ -434,10 +434,18 @@ public Action:PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
}
}
new debug_val = GetConVarInt(gCvars[CVAR_DEBUG]);
new String:debug_msg[64];
for (new x = 0; x < MAXTIMERS; x++)
{
if (tHandles[index][x] != INVALID_HANDLE)
{
if (debug_val > 1)
{
Format(debug_msg, sizeof(debug_msg), "PlayerDeath - Killing timer %i with handle %x.", x, tHandles[index][x]);
ZR_DebugPrintToConsole(0, debug_msg);
}
KillTimer(tHandles[index][x]);
tHandles[index][x] = INVALID_HANDLE;
}