From e620d973f43c7f42b33f29e060cb2cf8dde76760 Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Fri, 30 Aug 2013 14:15:02 -0400 Subject: [PATCH] Reserved slot fixes for OB games when SourceTV or Replay are enabled (bug 5499, r=drifter). --- plugins/reservedslots.sp | 62 ---------------------------------------- 1 file changed, 62 deletions(-) diff --git a/plugins/reservedslots.sp b/plugins/reservedslots.sp index 642828e3..ca5cf52e 100644 --- a/plugins/reservedslots.sp +++ b/plugins/reservedslots.sp @@ -55,10 +55,6 @@ new Handle:sm_reserve_type; new Handle:sm_reserve_maxadmins; new Handle:sm_reserve_kicktype; -new bool:g_BotsSubtractFromMax; -new g_SourceTV = -1; -new g_Replay = -1; - enum KickType { Kick_HighestPing, @@ -79,27 +75,6 @@ public OnPluginStart() HookConVarChange(sm_reserved_slots, SlotCountChanged); HookConVarChange(sm_hide_slots, SlotHideChanged); - - new EngineVersion:engineVersion = GetEngineVersion(); - g_BotsSubtractFromMax = engineVersion == Engine_TF2 || engineVersion == Engine_CSS || engineVersion == Engine_DODS || engineVersion == Engine_HL2DM; - - if (g_BotsSubtractFromMax) - { - for (new i = 1; i <= MaxClients; i++) - { - if (!IsClientConnected(i)) - continue; - - if (IsClientSourceTV(i)) - { - g_SourceTV = i; - } - else if (IsClientReplay(i)) - { - g_Replay = i; - } - } - } } public OnPluginEnd() @@ -143,18 +118,6 @@ public Action:OnTimedKick(Handle:timer, any:client) public OnClientPostAdminCheck(client) { - if (g_BotsSubtractFromMax) - { - if (IsClientSourceTV(client)) - { - g_SourceTV = client; - } - else if (IsClientReplay(client)) - { - g_Replay = client; - } - } - new reserved = GetConVarInt(sm_reserved_slots); if (reserved > 0) @@ -235,18 +198,6 @@ public OnClientPostAdminCheck(client) public OnClientDisconnect_Post(client) { - if (g_BotsSubtractFromMax) - { - if (client == g_SourceTV) - { - g_SourceTV = -1; - } - else if (client == g_Replay) - { - g_Replay = -1; - } - } - if (GetConVarBool(sm_hide_slots)) { SetVisibleMaxSlots(GetClientCount(false), GetMaxHumanPlayers() - GetConVarInt(sm_reserved_slots)); @@ -297,19 +248,6 @@ SetVisibleMaxSlots(clients, limit) num = limit; } - if (g_BotsSubtractFromMax) - { - if (g_SourceTV > -1) - { - --num; - } - - if (g_Replay > -1) - { - --num; - } - } - SetConVarInt(sv_visiblemaxplayers, num); }