Compare commits

..
Author SHA1 Message Date
Nicholas Hastings 300632db86 Update versioning for 1.5.1 release. 2013-09-10 14:59:41 -04:00
Nicholas Hastings d1776dd641 Updated changelog for version 1.5.1. 2013-09-10 14:58:42 -04:00
Drifter 22cee6a2dd Add CS_UpdateClientModel native to cstrike extension (bug 5905, r=psychonic). 2013-09-10 13:08:14 -04:00
Nicholas Hastings a2194df273 Fix attempted triggers from gagged users displaying in chat (bug 5918, r=asherkin). 2013-09-10 09:52:37 -04:00
Nicholas Hastings 27e20996dd Initialize DamageCustom var in SDKHooks CTakeDamageInfoHack (nobug, r=asherkin). 2013-09-09 18:41:54 -04:00
Kyle Sanderson b5f16142e5 Fix incorrect assignment in SDKHook_TakeDamage + cleanup (bug 5911, r=psychonic). 2013-09-06 18:37:13 -04:00
Peace-Maker 23f1f9e148 Added missing DispatchKeyValues and SDKHooks gamedata for HL2CTF (bug 5114, r=psychonic). 2013-09-05 22:31:44 -04:00
Nicholas Hastings 990f99af5a Reserved slot fixes for OB games when SourceTV or Replay are enabled (bug 5499, r=drifter). 2013-08-30 14:15:02 -04:00
Nicholas Hastings 6ca9d86e8f Make sm_mapvote_runoffpercent cvar work as advertised (bug 5890, r=asherkin). 2013-08-30 14:14:59 -04:00
Nicholas Hastings fae8b4d49a Fix translator system not loading languages with long identifier (bug 5888, r=dvander). 2013-08-28 13:18:55 -04:00
Nicholas Hastings 7f2d9dd8eb Updated TF2 Regenerate signature. 2013-08-27 23:32:56 -04:00
Nicholas Hastings 8ae1b3e1e7 Updated TF2 AddCond signature. 2013-08-27 21:08:37 -04:00
Nicholas Hastings c77c853c02 Updated plugin blacklist. 2013-08-26 10:31:25 -04:00
Nicholas Hastings 2b0daba573 Bumping version. 2013-08-25 19:45:28 -04:00
Nicholas Hastings ba4aa4d37f Added tag sourcemod-1.5.0 for changeset 78a1f1b1c6fa 2013-08-25 19:44:52 -04:00
18 changed files with 254 additions and 98 deletions
+1
View File
@@ -3,3 +3,4 @@ e6ef5ecdf8d75740ca2685a709bf321f8873bc3b sourcemod-1.1.0
e877885fac80be71822641f7a9122cebc9812521 sourcemod-1.1.1 e877885fac80be71822641f7a9122cebc9812521 sourcemod-1.1.1
b3ffa8a4511c4eadaf533fc790aa6b14f7f0c6ea sourcemod-1.1.2 b3ffa8a4511c4eadaf533fc790aa6b14f7f0c6ea sourcemod-1.1.2
3a73bbf60f34befa9b66be03fa5974b394bb3411 sourcemod-1.2.0 3a73bbf60f34befa9b66be03fa5974b394bb3411 sourcemod-1.2.0
78a1f1b1c6fa86fd7691c70ebf48a9fb3dfb3c11 sourcemod-1.5.0
+20
View File
@@ -1,5 +1,25 @@
SourceMod Changelog SourceMod Changelog
SourceMod 1.5.1 [2013-09-10]
URL: http://wiki.alliedmods.net/SourceMod_1.5.1_Release_Notes
User Changes:
- Updated gamedata support for TF2.
- Added missing DispatchKeyValue gamedata for HL2 CTF (bug 5114) (peace-maker).
- Fixed translations not being loaded if identifier was not two or three characters (fixes Portuguese) (bug 5888).
- Fixed runoff voting occurring when receiving the exact number of required votes (bug 5890).
- Fixed reserve slot plugin hiding too many slots on Orangebox gamesif SourceTV and/or Replay are present (bug 5499).
- Fixed some crashes in TF2 and unexpected behavior in all games with SDKHook_TakeDamage due to uninitialized var.
- Fixed attempted triggers from gagged users displaying in chat (bug 5918, r=asherkin).
- Fixed errors in Italian translation (Oktober).
- Added Norwegian translation (checkster).
Developer Changes:
- Added CS_UpdateClientModel native to CStrike extension for CS:S and CS:GO (bug 5905) (Drifter).
- Fixed setting weapon param in SDKHook_TakeDamage overwriting attacker instead of setting weapon (bug 5911) (KyleS)
----------------------------------------------------------
SourceMod 1.5.0 [2013-08-25] SourceMod 1.5.0 [2013-08-25]
URL: http://wiki.alliedmods.net/SourceMod_1.5.0_Release_Notes URL: http://wiki.alliedmods.net/SourceMod_1.5.0_Release_Notes
+1 -16
View File
@@ -479,13 +479,6 @@ SMCResult CPhraseFile::ReadSMC_KeyValue(const SMCStates *states, const char *key
} }
else else
{ {
size_t len = strlen(key);
if (len < 2 || len > 3)
{
ParseWarning("Ignoring translation to invalid language \"%s\" on line %d.", key, states->line);
return SMCResult_Continue;
}
unsigned int lang; unsigned int lang;
if (!m_pTranslator->GetLanguageByCode(key, &lang)) if (!m_pTranslator->GetLanguageByCode(key, &lang))
{ {
@@ -498,7 +491,7 @@ SMCResult CPhraseFile::ReadSMC_KeyValue(const SMCStates *states, const char *key
/* See how many bytes we need for this string, then allocate. /* See how many bytes we need for this string, then allocate.
* NOTE: THIS SHOULD GUARANTEE THAT WE DO NOT NEED TO NEED TO SIZE CHECK * NOTE: THIS SHOULD GUARANTEE THAT WE DO NOT NEED TO NEED TO SIZE CHECK
*/ */
len = strlen(value) + pPhrase->fmt_bytes + 1; size_t len = strlen(value) + pPhrase->fmt_bytes + 1;
char *out_buf; char *out_buf;
int out_idx; int out_idx;
@@ -921,14 +914,6 @@ SMCResult Translator::ReadSMC_LeavingSection(const SMCStates *states)
SMCResult Translator::ReadSMC_KeyValue(const SMCStates *states, const char *key, const char *value) SMCResult Translator::ReadSMC_KeyValue(const SMCStates *states, const char *key, const char *value)
{ {
size_t len = strlen(key);
if (len < 2 || len > 3)
{
smcore.LogError("[SM] Warning encountered parsing languages.cfg file.");
smcore.LogError("[SM] Invalid language code \"%s\" is being ignored.", key);
}
AddLanguage(key, value); AddLanguage(key, value);
return SMCResult_Continue; return SMCResult_Continue;
+20
View File
@@ -787,6 +787,25 @@ static cell_t CS_GetClientAssists(IPluginContext *pContext, const cell_t *params
#endif #endif
} }
static cell_t CS_UpdateClientModel(IPluginContext *pContext, const cell_t *params)
{
static ICallWrapper *pWrapper = NULL;
if (!pWrapper)
{
REGISTER_NATIVE_ADDR("SetModelFromClass",
pWrapper = g_pBinTools->CreateCall(addr, CallConv_ThisCall, NULL, NULL, 0));
}
CBaseEntity *pEntity;
if (!(pEntity=GetCBaseEntity(params[1], true)))
{
return pContext->ThrowNativeError("Client index %d is not valid", params[1]);
}
pWrapper->Execute(&pEntity, NULL);
return 1;
}
sp_nativeinfo_t g_CSNatives[] = sp_nativeinfo_t g_CSNatives[] =
{ {
{"CS_RespawnPlayer", CS_RespawnPlayer}, {"CS_RespawnPlayer", CS_RespawnPlayer},
@@ -807,6 +826,7 @@ sp_nativeinfo_t g_CSNatives[] =
{"CS_SetClientContributionScore", CS_SetClientContributionScore}, {"CS_SetClientContributionScore", CS_SetClientContributionScore},
{"CS_GetClientAssists", CS_GetClientAssists}, {"CS_GetClientAssists", CS_GetClientAssists},
{"CS_SetClientAssists", CS_SetClientAssists}, {"CS_SetClientAssists", CS_SetClientAssists},
{"CS_UpdateClientModel", CS_UpdateClientModel},
{"CS_IsValidWeaponID", CS_IsValidWeaponID}, {"CS_IsValidWeaponID", CS_IsValidWeaponID},
{NULL, NULL} {NULL, NULL}
}; };
+24 -14
View File
@@ -116,7 +116,7 @@ cell_t Native_TakeDamage(IPluginContext *pContext, const cell_t *params)
if (!pInflictor) if (!pInflictor)
return pContext->ThrowNativeError("Invalid entity index %d for inflictor", params[2]); return pContext->ThrowNativeError("Invalid entity index %d for inflictor", params[2]);
CBaseEntity *pAttacker = NULL; CBaseEntity *pAttacker;
if (params[3] != -1) if (params[3] != -1)
{ {
pAttacker = UTIL_GetCBaseEntity(params[3]); pAttacker = UTIL_GetCBaseEntity(params[3]);
@@ -125,21 +125,28 @@ cell_t Native_TakeDamage(IPluginContext *pContext, const cell_t *params)
return pContext->ThrowNativeError("Invalid entity index %d for attackerr", params[3]); return pContext->ThrowNativeError("Invalid entity index %d for attackerr", params[3]);
} }
} }
else
{
pAttacker = NULL;
}
float flDamage = sp_ctof(params[4]); float flDamage = sp_ctof(params[4]);
int iDamageType = params[5]; int iDamageType = params[5];
CBaseEntity *pWeapon = NULL; CBaseEntity *pWeapon;
if (params[6] != -1) if (params[6] != -1)
{ {
pAttacker = UTIL_GetCBaseEntity(params[6]); pWeapon = UTIL_GetCBaseEntity(params[6]);
if (!pAttacker) if (!pWeapon)
{ {
return pContext->ThrowNativeError("Invalid entity index %d for weapon", params[6]); return pContext->ThrowNativeError("Invalid entity index %d for weapon", params[6]);
} }
} }
else
{
pWeapon = NULL;
}
Vector vecDamageForce = Vector(0.0f, 0.0f, 0.0f);
cell_t *addr; cell_t *addr;
int err; int err;
if ((err = pContext->LocalToPhysAddr(params[7], &addr)) != SP_ERROR_NONE) if ((err = pContext->LocalToPhysAddr(params[7], &addr)) != SP_ERROR_NONE)
@@ -147,26 +154,29 @@ cell_t Native_TakeDamage(IPluginContext *pContext, const cell_t *params)
return pContext->ThrowNativeError("Could not read damageForce vector"); return pContext->ThrowNativeError("Could not read damageForce vector");
} }
Vector vecDamageForce;
if (addr != pContext->GetNullRef(SP_NULL_VECTOR)) if (addr != pContext->GetNullRef(SP_NULL_VECTOR))
{ {
vecDamageForce = Vector( vecDamageForce.Init(sp_ctof(addr[0]), sp_ctof(addr[1]), sp_ctof(addr[2]));
sp_ctof(addr[0]), }
sp_ctof(addr[1]), else
sp_ctof(addr[2])); {
vecDamageForce.Init();
} }
Vector vecDamagePosition = vec3_origin;
if ((err = pContext->LocalToPhysAddr(params[8], &addr)) != SP_ERROR_NONE) if ((err = pContext->LocalToPhysAddr(params[8], &addr)) != SP_ERROR_NONE)
{ {
return pContext->ThrowNativeError("Could not read damagePosition vector"); return pContext->ThrowNativeError("Could not read damagePosition vector");
} }
Vector vecDamagePosition;
if (addr != pContext->GetNullRef(SP_NULL_VECTOR)) if (addr != pContext->GetNullRef(SP_NULL_VECTOR))
{ {
vecDamagePosition = Vector( vecDamagePosition.Init(sp_ctof(addr[0]), sp_ctof(addr[1]), sp_ctof(addr[2]));
sp_ctof(addr[0]), }
sp_ctof(addr[1]), else
sp_ctof(addr[2])); {
vecDamagePosition = vec3_origin;
} }
CTakeDamageInfoHack info(pInflictor, pAttacker, flDamage, iDamageType, pWeapon, vecDamageForce, vecDamagePosition); CTakeDamageInfoHack info(pInflictor, pAttacker, flDamage, iDamageType, pWeapon, vecDamageForce, vecDamagePosition);
@@ -62,6 +62,12 @@ CTakeDamageInfoHack::CTakeDamageInfoHack( CBaseEntity *pInflictor, CBaseEntity *
m_vecReportedPosition = vec3_origin; m_vecReportedPosition = vec3_origin;
m_iAmmoType = -1; m_iAmmoType = -1;
#if SOURCE_ENGINE < SE_ORANGEBOX
m_iCustomKillType = 0;
#else
m_iDamageCustom = 0;
#endif
#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2 #if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
m_iDamagedOtherPlayers = 0; m_iDamagedOtherPlayers = 0;
m_iPlayerPenetrateCount = 0; m_iPlayerPenetrateCount = 0;
@@ -24,6 +24,7 @@
"plugin_24602c74f183cfcd157b3d50dee96c52" "" /* UCP Server (Endi) - Version 7.8.3 */ "plugin_24602c74f183cfcd157b3d50dee96c52" "" /* UCP Server (Endi) - Version 7.8.3 */
"plugin_78140f1a0f26cd3297767d0598eac4b1" "" /* [Any] PReplay (DarthNinja) - Version 1.0.0 */ "plugin_78140f1a0f26cd3297767d0598eac4b1" "" /* [Any] PReplay (DarthNinja) - Version 1.0.0 */
"plugin_55923ba6bfe41569a3e4fbd7ca4606e5" "" /* VIP Plugin (World-Source.Ru) - Version 2.0 */ "plugin_55923ba6bfe41569a3e4fbd7ca4606e5" "" /* VIP Plugin (World-Source.Ru) - Version 2.0 */
"plugin_4bf983e1d5b61ba0b1ab9a7e53bfda27" "" /* WarMod CS:GO (Twelve-60) */
} }
} }
} }
+115
View File
@@ -0,0 +1,115 @@
"Games"
{
/* HL2:CTF 2.1 */
"hl2ctf"
{
"Offsets"
{
"EndTouch"
{
"windows" "83"
"linux" "84"
}
"FireBullets"
{
"windows" "93"
"Linux" "94"
}
"GroundEntChanged"
{
"windows" "146"
"linux" "147"
}
"OnTakeDamage"
{
"windows" "54"
"linux" "55"
}
"PreThink"
{
"windows" "247"
"linux" "248"
}
"PostThink"
{
"windows" "248"
"linux" "249"
}
"SetTransmit"
{
"windows" "21"
"linux" "22"
}
"ShouldCollide"
{
"windows" "17"
"linux" "18"
}
"Spawn"
{
"windows" "23"
"linux" "24"
}
"StartTouch"
{
"windows" "81"
"linux" "82"
}
"Think"
{
"windows" "45"
"linux" "46"
}
"Touch"
{
"windows" "82"
"linux" "83"
}
"TraceAttack"
{
"windows" "53"
"linux" "54"
}
"VPhysicsUpdate"
{
"windows" "130"
"linux" "131"
}
"Weapon_CanSwitchTo"
{
"windows" "205"
"linux" "206"
}
"Weapon_CanUse"
{
"windows" "199"
"linux" "200"
}
"Weapon_Drop"
{
"windows" "202"
"linux" "203"
}
"Weapon_Equip"
{
"windows" "200"
"linux" "201"
}
"Weapon_Switch"
{
"windows" "203"
"linux" "204"
}
"Reload"
{
"windows" "213"
"linux" "214"
}
"Use"
{
"windows" "80"
"linux" "81"
}
}
}
}
+5
View File
@@ -159,4 +159,9 @@
{ {
"game" "synergy" "game" "synergy"
} }
"game.hl2ctf.txt"
{
"game" "hl2ctf"
}
} }
+16 -1
View File
@@ -11,7 +11,7 @@
"Games" "Games"
{ {
/* HL2:CTF 2.0 RC1 */ /* HL2:CTF 2.1 */
"hl2ctf" "hl2ctf"
{ {
@@ -87,6 +87,21 @@
"windows" "0" "windows" "0"
"linux" "0" "linux" "0"
} }
"DispatchKeyValue"
{
"windows" "30"
"linux" "29"
}
"DispatchKeyValueFloat"
{
"windows" "29"
"linux" "30"
}
"DispatchKeyValueVector"
{
"windows" "28"
"linux" "31"
}
} }
"Signatures" "Signatures"
{ {
+7
View File
@@ -138,6 +138,13 @@
"linux" "@_ZNK16FileWeaponInfo_t15GetAttributeIntEPKcPK13CEconItemView" "linux" "@_ZNK16FileWeaponInfo_t15GetAttributeIntEPKcPK13CEconItemView"
"mac" "@_ZNK16FileWeaponInfo_t15GetAttributeIntEPKcPK13CEconItemView" "mac" "@_ZNK16FileWeaponInfo_t15GetAttributeIntEPKcPK13CEconItemView"
} }
"SetModelFromClass"
{
"library" "server"
"windows" "\x55\x8B\xEC\x51\x53\x56\x8B\xF1\x57\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x8B\xD8"
"linux" "@_ZN9CCSPlayer17SetModelFromClassEv"
"mac" "@_ZN9CCSPlayer17SetModelFromClassEv"
}
} }
} }
+7
View File
@@ -138,6 +138,13 @@
"linux" "@_ZN12CCSGameRules13CheckWinLimitEv" "linux" "@_ZN12CCSGameRules13CheckWinLimitEv"
"mac" "@_ZN12CCSGameRules5ThinkEv" "mac" "@_ZN12CCSGameRules5ThinkEv"
} }
"SetModelFromClass"
{
"library" "server"
"windows" "\x55\x8B\xEC\x83\xEC\x2C\x89\x4D\xD4\x8B\x4D\xD4\xE8\x2A\x2A\x2A\x2A\x83\xF8\x02\x0F\x85\x2A\x2A\x2A\x2A\x8B"
"linux" "@_ZN9CCSPlayer17SetModelFromClassEv"
"mac" "@_ZN9CCSPlayer17SetModelFromClassEv"
}
} }
} }
+2 -2
View File
@@ -60,14 +60,14 @@
"Regenerate" "Regenerate"
{ {
"library" "server" "library" "server"
"windows" "\x55\x8B\xEC\x83\xEC\x2A\xF3\x0F\x2A\x2A\x2A\x2A\x2A\x2A\x53\x56\x8B\xF1\x8B" "windows" "\x55\x8B\xEC\x83\xEC\x2A\x53\x56\x8B\xF1\x8B\x06\x8B\x2A\x2A\x2A\x2A\x2A\x57\xFF\xD2\x8B\x8E\x2A\x2A\x2A\x2A\x8D\x9E"
"linux" "@_ZN9CTFPlayer10RegenerateEb" "linux" "@_ZN9CTFPlayer10RegenerateEb"
"mac" "@_ZN9CTFPlayer10RegenerateEb" "mac" "@_ZN9CTFPlayer10RegenerateEb"
} }
"AddCondition" "AddCondition"
{ {
"library" "server" "library" "server"
"windows" "\x55\x8B\xEC\x83\xEC\x08\x53\x56\x8B\x75\x08\x57\x8B\xD9" "windows" "\x55\x8B\xEC\x83\xEC\x08\x53\x8B\xD9\x83\xBB\x2A\x2A\x2A\x2A\x00\x0F"
"linux" "@_ZN15CTFPlayerShared7AddCondE7ETFCondfP11CBaseEntity" "linux" "@_ZN15CTFPlayerShared7AddCondE7ETFCondfP11CBaseEntity"
"mac" "@_ZN15CTFPlayerShared7AddCondE7ETFCondfP11CBaseEntity" "mac" "@_ZN15CTFPlayerShared7AddCondE7ETFCondfP11CBaseEntity"
} }
+17 -1
View File
@@ -98,6 +98,22 @@ public OnPluginStart()
{ {
OnAdminMenuReady(topmenu); OnAdminMenuReady(topmenu);
} }
// Normally, OnClientSayCommand would be aqequate and more appropirate here, but it does
// not catch attempted chat triggers, which we also want to be blocked if a player is gagged.
AddCommandListener(Command_Say, "say");
AddCommandListener(Command_Say, "say_team");
new String:gameDir[64];
GetGameFolderName(gameDir, sizeof(gameDir));
if (StrEqual(gameDir, "insurgency", false))
{
AddCommandListener(Command_Say, "say2");
}
else if (StrEqual(gameDir, "nucleardawn", false))
{
AddCommandListener(Command_Say, "say_squad");
}
} }
public OnAdminMenuReady(Handle:topmenu) public OnAdminMenuReady(Handle:topmenu)
@@ -151,7 +167,7 @@ public bool:OnClientConnect(client, String:rejectmsg[], maxlen)
return true; return true;
} }
public Action:OnClientSayCommand(client, const String:command[], const String:sArgs[]) public Action:Command_Say(client, const String:command[], argc)
{ {
if (client) if (client)
{ {
+10
View File
@@ -367,6 +367,15 @@ native CS_WeaponIDToAlias(CSWeaponID:weaponID, String:destination[], len);
*/ */
native bool:CS_IsValidWeaponID(CSWeaponID:id); native bool:CS_IsValidWeaponID(CSWeaponID:id);
/**
* Sets a player's model based on their current class
*
* @param client Player's index.
* @noreturn
* @error Invalid client index, client not in game.
*/
native CS_UpdateClientModel(client);
/** /**
* Do not edit below this line! * Do not edit below this line!
*/ */
@@ -404,6 +413,7 @@ public __ext_cstrike_SetNTVOptional()
MarkNativeAsOptional("CS_AliasToWeaponID"); MarkNativeAsOptional("CS_AliasToWeaponID");
MarkNativeAsOptional("CS_WeaponIDToAlias"); MarkNativeAsOptional("CS_WeaponIDToAlias");
MarkNativeAsOptional("CS_IsValidWeaponID"); MarkNativeAsOptional("CS_IsValidWeaponID");
MarkNativeAsOptional("CS_UpdateClientModel");
} }
#endif #endif
+1 -1
View File
@@ -790,7 +790,7 @@ public Handler_MapVoteFinished(Handle:menu,
new Float:winningvotes = float(item_info[0][VOTEINFO_ITEM_VOTES]); new Float:winningvotes = float(item_info[0][VOTEINFO_ITEM_VOTES]);
new Float:required = num_votes * (GetConVarFloat(g_Cvar_RunOffPercent) / 100.0); new Float:required = num_votes * (GetConVarFloat(g_Cvar_RunOffPercent) / 100.0);
if (winningvotes <= required) if (winningvotes < required)
{ {
/* Insufficient Winning margin - Lets do a runoff */ /* Insufficient Winning margin - Lets do a runoff */
g_VoteMenu = CreateMenu(Handler_MapVoteMenu, MenuAction:MENU_ACTIONS_ALL); g_VoteMenu = CreateMenu(Handler_MapVoteMenu, MenuAction:MENU_ACTIONS_ALL);
-62
View File
@@ -55,10 +55,6 @@ new Handle:sm_reserve_type;
new Handle:sm_reserve_maxadmins; new Handle:sm_reserve_maxadmins;
new Handle:sm_reserve_kicktype; new Handle:sm_reserve_kicktype;
new bool:g_BotsSubtractFromMax;
new g_SourceTV = -1;
new g_Replay = -1;
enum KickType enum KickType
{ {
Kick_HighestPing, Kick_HighestPing,
@@ -79,27 +75,6 @@ public OnPluginStart()
HookConVarChange(sm_reserved_slots, SlotCountChanged); HookConVarChange(sm_reserved_slots, SlotCountChanged);
HookConVarChange(sm_hide_slots, SlotHideChanged); 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() public OnPluginEnd()
@@ -143,18 +118,6 @@ public Action:OnTimedKick(Handle:timer, any:client)
public OnClientPostAdminCheck(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); new reserved = GetConVarInt(sm_reserved_slots);
if (reserved > 0) if (reserved > 0)
@@ -235,18 +198,6 @@ public OnClientPostAdminCheck(client)
public OnClientDisconnect_Post(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)) if (GetConVarBool(sm_hide_slots))
{ {
SetVisibleMaxSlots(GetClientCount(false), GetMaxHumanPlayers() - GetConVarInt(sm_reserved_slots)); SetVisibleMaxSlots(GetClientCount(false), GetMaxHumanPlayers() - GetConVarInt(sm_reserved_slots));
@@ -297,19 +248,6 @@ SetVisibleMaxSlots(clients, limit)
num = limit; num = limit;
} }
if (g_BotsSubtractFromMax)
{
if (g_SourceTV > -1)
{
--num;
}
if (g_Replay > -1)
{
--num;
}
}
SetConVarInt(sv_visiblemaxplayers, num); SetConVarInt(sv_visiblemaxplayers, num);
} }
+1 -1
View File
@@ -1 +1 @@
1.5.0 1.5.1