Backed out changeset 6b5fa86c1a0d (bug 4315).
This commit is contained in:
parent
bf345eea8c
commit
dfefda81e1
@ -61,7 +61,6 @@ int lifestate_offset = -1;
|
||||
List<ICommandTargetProcessor *> target_processors;
|
||||
|
||||
SH_DECL_HOOK5(IServerGameClients, ClientConnect, SH_NOATTRIB, 0, bool, edict_t *, const char *, const char *, char *, int);
|
||||
SH_DECL_HOOK2_void(IServerGameClients, ClientActive, SH_NOATTRIB, 0, edict_t *, bool);
|
||||
SH_DECL_HOOK2_void(IServerGameClients, ClientPutInServer, SH_NOATTRIB, 0, edict_t *, const char *);
|
||||
SH_DECL_HOOK1_void(IServerGameClients, ClientDisconnect, SH_NOATTRIB, 0, edict_t *);
|
||||
#if SOURCE_ENGINE >= SE_ORANGEBOX
|
||||
@ -136,7 +135,6 @@ void PlayerManager::OnSourceModAllInitialized()
|
||||
SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientCommand, serverClients, this, &PlayerManager::OnClientCommand, false);
|
||||
SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientSettingsChanged, serverClients, this, &PlayerManager::OnClientSettingsChanged, true);
|
||||
SH_ADD_HOOK_MEMFUNC(IServerGameDLL, ServerActivate, gamedll, this, &PlayerManager::OnServerActivate, true);
|
||||
SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientActive, serverClients, this, &PlayerManager::OnClientActive, true);
|
||||
|
||||
g_ShareSys.AddInterface(NULL, this);
|
||||
|
||||
@ -173,7 +171,6 @@ void PlayerManager::OnSourceModAllInitialized()
|
||||
|
||||
void PlayerManager::OnSourceModShutdown()
|
||||
{
|
||||
SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientActive, serverClients, this, &PlayerManager::OnClientActive, true);
|
||||
SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientConnect, serverClients, this, &PlayerManager::OnClientConnect, false);
|
||||
SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientPutInServer, serverClients, this, &PlayerManager::OnClientPutInServer, true);
|
||||
SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientDisconnect, serverClients, this, &PlayerManager::OnClientDisconnect, false);
|
||||
@ -492,14 +489,6 @@ bool PlayerManager::OnClientConnect_Post(edict_t *pEntity, const char *pszName,
|
||||
return true;
|
||||
}
|
||||
|
||||
void PlayerManager::OnClientActive(edict_t *pEntity, bool bLoadGame)
|
||||
{
|
||||
int client = IndexOfEdict(pEntity);
|
||||
CPlayer *pPlayer = &m_Players[client];
|
||||
|
||||
pPlayer->Activate();
|
||||
}
|
||||
|
||||
void PlayerManager::OnClientPutInServer(edict_t *pEntity, const char *playername)
|
||||
{
|
||||
cell_t res;
|
||||
@ -1456,7 +1445,6 @@ CPlayer::CPlayer()
|
||||
m_LastPassword.clear();
|
||||
m_LangId = SOURCEMOD_LANGUAGE_ENGLISH;
|
||||
m_bFakeClient = false;
|
||||
m_IsActive = false;
|
||||
}
|
||||
|
||||
void CPlayer::Initialize(const char *name, const char *ip, edict_t *pEntity)
|
||||
@ -1528,7 +1516,6 @@ void CPlayer::Disconnect()
|
||||
m_UserId = -1;
|
||||
m_bIsInKickQueue = false;
|
||||
m_bFakeClient = false;
|
||||
m_IsActive = false;
|
||||
}
|
||||
|
||||
void CPlayer::SetName(const char *name)
|
||||
@ -1840,14 +1827,3 @@ unsigned int CPlayer::GetSerial()
|
||||
{
|
||||
return m_Serial.value;
|
||||
}
|
||||
|
||||
bool CPlayer::IsActive()
|
||||
{
|
||||
return m_IsActive;
|
||||
}
|
||||
|
||||
void CPlayer::Activate()
|
||||
{
|
||||
m_IsActive = true;
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,6 @@ public:
|
||||
const char *GetAuthString();
|
||||
edict_t *GetEdict();
|
||||
bool IsInGame();
|
||||
bool IsActive();
|
||||
bool WasCountedAsInGame();
|
||||
bool IsConnected();
|
||||
bool IsAuthorized();
|
||||
@ -91,7 +90,6 @@ public:
|
||||
void DoBasicAdminChecks();
|
||||
void MarkAsBeingKicked();
|
||||
int GetLifeState();
|
||||
void Activate();
|
||||
private:
|
||||
void Initialize(const char *name, const char *ip, edict_t *pEntity);
|
||||
void Connect();
|
||||
@ -121,7 +119,6 @@ private:
|
||||
int m_UserId;
|
||||
bool m_bFakeClient;
|
||||
serial_t m_Serial;
|
||||
bool m_IsActive;
|
||||
};
|
||||
|
||||
class PlayerManager :
|
||||
@ -150,7 +147,6 @@ public:
|
||||
void OnClientPutInServer(edict_t *pEntity, char const *playername);
|
||||
void OnClientDisconnect(edict_t *pEntity);
|
||||
void OnClientDisconnect_Post(edict_t *pEntity);
|
||||
void OnClientActive(edict_t *pEntity, bool bLoadGame);
|
||||
#if SOURCE_ENGINE >= SE_ORANGEBOX
|
||||
void OnClientCommand(edict_t *pEntity, const CCommand &args);
|
||||
#else
|
||||
|
@ -45,7 +45,6 @@
|
||||
#include <sm_trie_tpl.h>
|
||||
#include "Logger.h"
|
||||
#include "ConsoleDetours.h"
|
||||
#include <assert.h>
|
||||
|
||||
#if (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||
#define NET_SETCONVAR 6
|
||||
@ -201,7 +200,6 @@ static void ReplicateConVar(ConVar *pConVar)
|
||||
|
||||
if (pPlayer && pPlayer->IsInGame() && !pPlayer->IsFakeClient())
|
||||
{
|
||||
assert(pPlayer->IsActive());
|
||||
INetChannel *netchan = static_cast<INetChannel *>(engine->GetPlayerNetInfo(i));
|
||||
netchan->SendData(buffer);
|
||||
}
|
||||
@ -1323,11 +1321,6 @@ static cell_t SendConVarValue(IPluginContext *pContext, const cell_t *params)
|
||||
return pContext->ThrowNativeError("Client %d is fake and cannot be targeted", params[1]);
|
||||
}
|
||||
|
||||
if (!pPlayer->IsActive())
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
INetChannel *netchan = static_cast<INetChannel *>(engine->GetPlayerNetInfo(params[1]));
|
||||
netchan->SendData(buffer);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user