From 70ea880d112c40b3fe1a072d185ac29b0689a4cf Mon Sep 17 00:00:00 2001 From: richard Date: Wed, 12 Nov 2008 16:01:50 +0100 Subject: [PATCH] zspawn confirmed fixed. Added debug messages on OnClientDisconnect and PlayerDeath. --- changelog.txt | 4 ++++ src/zombiereloaded.sp | 10 +++++++++- src/zr/event.inc | 8 ++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 8f1d234..fb2bd4e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -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. diff --git a/src/zombiereloaded.sp b/src/zombiereloaded.sp index cc25f28..1af098d 100644 --- a/src/zombiereloaded.sp +++ b/src/zombiereloaded.sp @@ -15,7 +15,7 @@ #undef REQUIRE_PLUGIN #include -#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; } diff --git a/src/zr/event.inc b/src/zr/event.inc index 97c3e75..54f5021 100644 --- a/src/zr/event.inc +++ b/src/zr/event.inc @@ -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; }