From f177f78fe7360143511df4d7d8001343655fd503 Mon Sep 17 00:00:00 2001 From: BotoX Date: Sun, 12 Jun 2016 14:07:44 +0200 Subject: [PATCH] cleaned up last commit removed unnecessary dos2unix from make all --- Makefile | 2 +- .../cfg/sourcemod/zombiereloaded/zombiereloaded.cfg | 4 ++++ src/zr/overlays.inc | 2 +- src/zr/respawn.inc | 3 +-- src/zr/ztele/cvars.inc | 10 +++++----- src/zr/ztele/ztele.inc | 2 +- 6 files changed, 13 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 9ce34bd..7489064 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ vpath %.smx $(BUILDDIR) SOURCEFILES=$(SOURCEDIR)/*.sp OBJECTS=$(patsubst %.sp, %.smx, $(notdir $(wildcard $(SOURCEFILES)))) -all: prepare $(OBJECTS) +all: prepare_builddir $(OBJECTS) prepare: prepare_newlines prepare_builddir diff --git a/cstrike/cfg/sourcemod/zombiereloaded/zombiereloaded.cfg b/cstrike/cfg/sourcemod/zombiereloaded/zombiereloaded.cfg index cbe416e..7f38671 100644 --- a/cstrike/cfg/sourcemod/zombiereloaded/zombiereloaded.cfg +++ b/cstrike/cfg/sourcemod/zombiereloaded/zombiereloaded.cfg @@ -769,6 +769,10 @@ zr_ztele_autocancel "1" // Default: "20" zr_ztele_autocancel_distance "20" +// Teleport player to a random spawn point instead of the players initial one, when using ztele. +// Default: "0" +zr_ztele_random_spawn "0" + // ---------------------------------------------------------------------------- // ZHP (module) diff --git a/src/zr/overlays.inc b/src/zr/overlays.inc index 71b816c..426cf7f 100644 --- a/src/zr/overlays.inc +++ b/src/zr/overlays.inc @@ -148,13 +148,13 @@ OverlaysOnRoundStart() if (tOverlays != INVALID_HANDLE) { KillTimer(tOverlays); + tOverlays = INVALID_HANDLE; } // If antistick is disabled, then stop. new Float:overlaysupdate = GetConVarFloat(g_hCvarsList[CVAR_OVERLAYS_UPDATE_TIME]); if (overlaysupdate <= 0.0) { - tOverlays = INVALID_HANDLE; return; } diff --git a/src/zr/respawn.inc b/src/zr/respawn.inc index f32daa1..c62d920 100644 --- a/src/zr/respawn.inc +++ b/src/zr/respawn.inc @@ -93,12 +93,12 @@ RespawnOnClientDeath(client, attacker, const String:weapon[]) if (tRespawn[client] != INVALID_HANDLE) { KillTimer(tRespawn[client]); + tRespawn[client] = INVALID_HANDLE; } // If player was infected, then stop. if (StrEqual(weapon, "zombie_claws_of_death", false)) { - tRespawn[client] = INVALID_HANDLE; return; } @@ -106,7 +106,6 @@ RespawnOnClientDeath(client, attacker, const String:weapon[]) new bool:respawn = GetConVarBool(g_hCvarsList[CVAR_RESPAWN]); if (!respawn) { - tRespawn[client] = INVALID_HANDLE; return; } diff --git a/src/zr/ztele/cvars.inc b/src/zr/ztele/cvars.inc index b97380c..2feee51 100644 --- a/src/zr/ztele/cvars.inc +++ b/src/zr/ztele/cvars.inc @@ -34,7 +34,7 @@ Handle ZTeleCvar_MaxZombie; Handle ZTeleCvar_MaxHuman; Handle ZTeleCvar_AutoCancel; Handle ZTeleCvar_AutoCancelDistance; -Handle ZTeleCvar_RandomPosition; +Handle ZTeleCvar_RandomSpawn; void ZTele_OnCvarsCreate() { @@ -47,7 +47,7 @@ void ZTele_OnCvarsCreate() ZTeleCvar_MaxHuman = CreateConVar("zr_ztele_max_human", "1", "Max number of times a human is allowed to use ZTele per round. [Dependency: zr_ztele_human_(before)/(after)]"); ZTeleCvar_AutoCancel = CreateConVar("zr_ztele_autocancel", "1", "Automatically cancel ZTele if player moves out of a set boundary. [Dependency: zr_ztele_(zombie)/(human)[_(before)/(after)]]"); ZTeleCvar_AutoCancelDistance = CreateConVar("zr_ztele_autocancel_distance", "20", "Maximum distance, in feet, player is allowed to travel before teleport is cancelled. [Dependency: zr_ztele_autocancel]"); - ZTeleCvar_RandomPosition = CreateConVar("zr_ztele_random_position", "0", "Teleport player to the random spawn position, not only his own one."); + ZTeleCvar_RandomSpawn = CreateConVar("zr_ztele_random_spawn", "0", "Teleport player to a random spawn point instead of the players initial one, when using ztele."); } bool ZTele_ZombieCanTeleport() @@ -95,7 +95,7 @@ float ZTele_GetAutoCancelDistance() return GetConVarFloat(ZTeleCvar_AutoCancelDistance); } -bool ZTele_IsRandomPositionEnabled() +bool ZTele_IsRandomSpawnEnabled() { - return GetConVarBool(ZTeleCvar_RandomPosition); -} \ No newline at end of file + return GetConVarBool(ZTeleCvar_RandomSpawn); +} diff --git a/src/zr/ztele/ztele.inc b/src/zr/ztele/ztele.inc index 0051f16..bbda996 100644 --- a/src/zr/ztele/ztele.inc +++ b/src/zr/ztele/ztele.inc @@ -250,7 +250,7 @@ bool ZTeleClient(int client, bool force = false) void ZTele_TeleportClient(int client) { // Teleport client. - if (ZTele_IsRandomPositionEnabled()) + if (ZTele_IsRandomSpawnEnabled()) { int select = Math_GetRandomInt(0, g_iZTeleSpawnPointsCount - 1); TeleportEntity(client, g_vecZTeleSpawnPoints[select], NULL_VECTOR, view_as({0.0, 0.0, 0.0}));