From 99f0bfef7b874d3a48ecd66d006b48283a41afe8 Mon Sep 17 00:00:00 2001 From: Richard Helgeby Date: Sun, 22 Mar 2015 18:57:44 +0100 Subject: [PATCH] Extract function ZTeleClientInProgress. --- src/zr/ztele.inc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/zr/ztele.inc b/src/zr/ztele.inc index 84bd52b..9f22f5f 100644 --- a/src/zr/ztele.inc +++ b/src/zr/ztele.inc @@ -130,7 +130,7 @@ bool:ZTeleClient(client, bool:force = false) } // If teleport is already in progress, then stop. - if (tZTele[client] != INVALID_HANDLE) + if (ZTeleClientInProgress(client)) { if (!force) { @@ -438,9 +438,14 @@ public Action:ZTeleTimer(Handle:timer, any:client) return Plugin_Continue; } +bool ZTeleClientInProgress(client) +{ + return tZTele[client] != INVALID_HANDLE; +} + ZTeleStopTimer(client) { - if (tZTele[client] != INVALID_HANDLE) + if (ZTeleClientInProgress(client)) { KillTimer(tZTele[client]); }