autovacate remove for test

This commit is contained in:
jeefo 2016-01-12 15:53:14 +03:00
commit c6422c19a9

View file

@ -1105,11 +1105,6 @@ int ClientConnect (edict_t *ent, const char *name, const char *addr, char reject
if (strcmp (addr, "loopback") == 0) if (strcmp (addr, "loopback") == 0)
g_hostEntity = ent; // save the edict of the listen server client... g_hostEntity = ent; // save the edict of the listen server client...
extern ConVar yb_autovacate;
if (IsDedicatedServer () && yb_autovacate.GetBool () && !IsValidBot (ent) && ent != g_hostEntity)
bots.RemoveRandom ();
if (g_isMetamod) if (g_isMetamod)
RETURN_META_VALUE (MRES_IGNORED, 0); RETURN_META_VALUE (MRES_IGNORED, 0);
@ -1129,12 +1124,6 @@ void ClientDisconnect (edict_t *ent)
// to reset his entity pointer for safety. There are still a few server frames to go once a // to reset his entity pointer for safety. There are still a few server frames to go once a
// listen server client disconnects, and we don't want to send him any sort of message then. // listen server client disconnects, and we don't want to send him any sort of message then.
extern ConVar yb_autovacate;
extern ConVar yb_quota;
if (yb_autovacate.GetBool () && IsValidPlayer (ent) && !IsValidBot (ent) && ent != g_hostEntity && yb_quota.GetInt () < GetMaxClients () - 1)
bots.AddRandom ();
int i = IndexOfEntity (ent) - 1; int i = IndexOfEntity (ent) - 1;
InternalAssert (i >= 0 && i < 32); InternalAssert (i >= 0 && i < 32);