From c2760c9de0d9b1de014b991535a516171b83a168 Mon Sep 17 00:00:00 2001 From: richard Date: Wed, 14 Jan 2009 01:04:29 +0100 Subject: [PATCH] Fixed ztick still working when disabled. Code cleanup: Removed old teleport functions and debug messages in zspawn. --- changelog.txt | 4 +++ src/zombiereloaded.sp | 2 +- src/zr/sayhooks.inc | 63 +------------------------------------------ 3 files changed, 6 insertions(+), 63 deletions(-) diff --git a/changelog.txt b/changelog.txt index 8dae421..7979e2e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,7 @@ +2009.01.13 - 2.5.1.20 + * Fixed zstuck still working when disabled. + * Code cleanup: Removed old teleport functions and debug messages in zspawn. + 2009.01.13 - 2.5.1.19 * Added per-client teleport buffers instead of one common (still only for admins). * Made zr_tele_reset_buffers CVAR for resetting custom saved locations on round start. Abuse protection. diff --git a/src/zombiereloaded.sp b/src/zombiereloaded.sp index ed9025a..d10a3bb 100644 --- a/src/zombiereloaded.sp +++ b/src/zombiereloaded.sp @@ -15,7 +15,7 @@ #undef REQUIRE_PLUGIN #include -#define VERSION "2.5.1.19" +#define VERSION "2.5.1.20" #include "zr/zombiereloaded" #include "zr/global" diff --git a/src/zr/sayhooks.inc b/src/zr/sayhooks.inc index d66aab7..0774a06 100644 --- a/src/zr/sayhooks.inc +++ b/src/zr/sayhooks.inc @@ -197,98 +197,37 @@ public Market_PostOnWeaponSelected(client, &bool:allowed) ZSpawn(client) { - if (GetConVarBool(gCvars[CVAR_DEBUG])) ZR_DebugPrintToConsole(client, "ZSpawn: Spawn request:"); new bool:spawn = GetConVarBool(gCvars[CVAR_ZSPAWN]); if (!spawn) { ZR_PrintToChat(client, "Feature is disabled"); - if (GetConVarBool(gCvars[CVAR_DEBUG])) ZR_DebugPrintToConsole(client, "ZSpawn: Not enabled."); return; } new team = GetClientTeam(client); if (team != CS_TEAM_T && team != CS_TEAM_CT) { - if (GetConVarBool(gCvars[CVAR_DEBUG])) ZR_DebugPrintToConsole(client, "ZSpawn: Player is not a T or CT."); return; } if (IsPlayerAlive(client)) { - if (GetConVarBool(gCvars[CVAR_DEBUG])) ZR_DebugPrintToConsole(client, "ZSpawn: Player appears to be alive."); return; } if (IsPlayerInList(client)) { - if (GetConVarBool(gCvars[CVAR_DEBUG])) ZR_DebugPrintToConsole(client, "ZSpawn: Player is already in the list (= maybe spawned, or bug)."); return; } - if (GetConVarBool(gCvars[CVAR_DEBUG])) ZR_DebugPrintToConsole(client, "ZSpawn: Spawned player"); RespawnPlayer(client); AddPlayerToList(client); } -/* -ZTele(client) -{ - new bool:tele = GetConVarBool(gCvars[CVAR_ZTELE]); - if (!tele) - { - ZR_PrintToChat(client, "Feature is disabled"); - - return; - } - - new bool:tele_humans = GetConVarBool(gCvars[CVAR_ZTELE_HUMANS]); - if (!IsPlayerZombie(client) && !tele_humans && zombieSpawned) - { - ZR_PrintToChat(client, "!ztele humans restricted"); - - return; - } - - if (!IsPlayerAlive(client) || tHandles[client][TTELE] != INVALID_HANDLE) - { - return; - } - - new count = teleCount[client]; - new limit = GetConVarInt(gCvars[CVAR_ZTELE_LIMIT]); - - if (limit > 0) - { - if (count < limit) - { - tHandles[client][TTELE] = CreateTimer(3.0, Teleport, client, TIMER_FLAG_NO_MAPCHANGE); - teleCount[client]++; - ZR_PrintToChat(client, "!ztele amount", limit - teleCount[client]); - } - else - { - ZR_PrintToChat(client, "!ztele limit reached"); - } - } - else - { - tHandles[client][TTELE] = CreateTimer(3.0, Teleport, client, TIMER_FLAG_NO_MAPCHANGE); - ZR_PrintToChat(client, "!ztele amount unlimited"); - } -} - -public Action:Teleport(Handle:timer, any:index) -{ - TeleportEntity(index, spawnLoc[index], NULL_VECTOR, NULL_VECTOR); - - tHandles[index][TTELE] = INVALID_HANDLE; -} -*/ - ZStuck(client) { - new bool:stuck = GetConVarBool(gCvars[CVAR_ZTELE]); + new bool:stuck = GetConVarBool(gCvars[CVAR_ZSTUCK]); if (!stuck) { ZR_PrintToChat(client, "Feature is disabled");