From 0c75482eb803b562bf8290a515916eb226654dff Mon Sep 17 00:00:00 2001 From: Greyscale Date: Mon, 22 Jun 2009 13:07:19 -0700 Subject: [PATCH] Fixed memory leak, and timer error. --- src/zr/roundend.inc | 3 +++ src/zr/weapons/weapons.inc | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/zr/roundend.inc b/src/zr/roundend.inc index 83ae80a..6e3fe11 100644 --- a/src/zr/roundend.inc +++ b/src/zr/roundend.inc @@ -207,6 +207,9 @@ RoundEndOutcome:RoundEndReasonToOutcome(reason) */ public Action:RoundEndTimer(Handle:timer) { + // Set the global timer handle variable to INVALID_HANDLE. + tRoundEnd = INVALID_HANDLE; + // If there aren't clients on both teams, then stop. if (!ZRTeamHasClients()) { diff --git a/src/zr/weapons/weapons.inc b/src/zr/weapons/weapons.inc index a92374b..7c91fa1 100644 --- a/src/zr/weapons/weapons.inc +++ b/src/zr/weapons/weapons.inc @@ -343,7 +343,7 @@ WeaponsOnItemPickup(client, weapon) WritePackCell(eventinfo, weapon); // Create post delay timer. - CreateTimer(0.0, WeaponsOnItemPickupPost, eventinfo); + CreateTimer(0.0, WeaponsOnItemPickupPost, eventinfo, TIMER_DATA_HNDL_CLOSE); } /**