Merged heads.

This commit is contained in:
Greyscale 2009-07-23 17:06:21 -07:00
commit f6565bc81c
4 changed files with 10 additions and 3 deletions

View File

@ -617,6 +617,10 @@ zr_zspawn_team_override "1"
// Default: "0"
zr_zspawn_team_zombie "0"
// Block players disconnecting and rejoing the game using zspawn.
// Default: "1"
zr_zspawn_block_rejoin "1"
// Put a time limit on the use of ZSpawn.
// Default: "1"
zr_zspawn_timelimit "1"

View File

@ -32,7 +32,7 @@
#include <cstrike>
#include <zrtools>
#define VERSION "3.0-dev"
#define VERSION "3.0.0-dev"
// Header includes.
#include "zr/log.h"

View File

@ -146,6 +146,7 @@ enum CvarsList
Handle:CVAR_ZSPAWN,
Handle:CVAR_ZSPAWN_TEAM_OVERRIDE,
Handle:CVAR_ZSPAWN_TEAM_ZOMBIE,
Handle:CVAR_ZSPAWN_BLOCK_REJOIN,
Handle:CVAR_ZSPAWN_TIMELIMIT,
Handle:CVAR_ZSPAWN_TIMELIMIT_TIME,
Handle:CVAR_ZSPAWN_TIMELIMIT_ZOMBIE,
@ -440,10 +441,11 @@ CvarsCreate()
g_hCvarsList[CVAR_ZSPAWN_TEAM_OVERRIDE] = CreateConVar("zr_zspawn_team_override", "1", "Override spawn team when spawning by means of ZSpawn.");
g_hCvarsList[CVAR_ZSPAWN_TEAM_ZOMBIE] = CreateConVar("zr_zspawn_team_zombie", "0", "Spawn player on zombie team when spawning by means of ZSpawn. [Dependency: zr_zspawn_team_override | Override: zr_respawn_zombie]");
g_hCvarsList[CVAR_ZSPAWN_BLOCK_REJOIN] = CreateConVar("zr_zspawn_block_rejoin", "1", "Block players disconnecting and rejoing the game using zspawn.");
g_hCvarsList[CVAR_ZSPAWN_TIMELIMIT] = CreateConVar("zr_zspawn_timelimit", "1", "Put a time limit on the use of ZSpawn.");
g_hCvarsList[CVAR_ZSPAWN_TIMELIMIT_TIME] = CreateConVar("zr_zspawn_timelimit_time", "120.0", "Time from the start of the round to allow ZSpawn. [Dependency: zr_zspawn_timelimit]");
g_hCvarsList[CVAR_ZSPAWN_TIMELIMIT_ZOMBIE] = CreateConVar("zr_zspawn_timelimit_zombie", "1", "Spawn player on the zombie team AFTER the timelimit is up. ['-1' = Block ZSpawn | '0' = Spawn as human | '1' = Spawn as zombie | Dependency: zr_zspawn_timelimit]");
g_hCvarsList[CVAR_ZSPAWN_TIMELIMIT_ZOMBIE] = CreateConVar("zr_zspawn_timelimit_zombie", "1", "Spawn player on the zombie team AFTER the timelimit is up. ['-1' = Block ZSpawn | '0' = Spawn as human | '1' = Spawn as zombie | Dependency: zr_zspawn_timelimit]");
// ===========================

View File

@ -210,7 +210,8 @@ bool:ZSpawnClient(client, bool:force = false, bool:zombie = false)
}
// Block if client has already played during this round.
if (!force && SteamidCacheClientExists(g_hZSpawnSteamIDCache, client))
new blockrejoin = GetConVarBool(g_hCvarsList[CVAR_ZSPAWN_BLOCK_REJOIN]);
if (!force && SteamidCacheClientExists(g_hZSpawnSteamIDCache, client) && blockrejoin)
{
// Tell client the command may only be used when joining late.
TranslationPrintToChat(client, "ZSpawn double spawn");