From 9badb14c3afadfb6de7758a095d2fcf6b12b787f Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Sun, 6 Apr 2014 17:03:29 -0400 Subject: [PATCH] Update for Dota IServerGameClient changes. --- core/PlayerManager.cpp | 8 ++++---- core/PlayerManager.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/PlayerManager.cpp b/core/PlayerManager.cpp index ef8c9aac..8c7d57a7 100644 --- a/core/PlayerManager.cpp +++ b/core/PlayerManager.cpp @@ -60,7 +60,7 @@ List target_processors; #if SOURCE_ENGINE == SE_DOTA SH_DECL_HOOK5(IServerGameClients, ClientConnect, SH_NOATTRIB, 0, bool, CEntityIndex, const char *, const char *, char *, int); SH_DECL_HOOK2_void(IServerGameClients, ClientPutInServer, SH_NOATTRIB, 0, CEntityIndex, const char *); -SH_DECL_HOOK1_void(IServerGameClients, ClientDisconnect, SH_NOATTRIB, 0, CEntityIndex); +SH_DECL_HOOK2_void(IServerGameClients, ClientDisconnect, SH_NOATTRIB, 0, CEntityIndex, int); SH_DECL_HOOK2_void(IServerGameClients, ClientCommand, SH_NOATTRIB, 0, CEntityIndex, const CCommand &); SH_DECL_HOOK1_void(IServerGameClients, ClientSettingsChanged, SH_NOATTRIB, 0, CEntityIndex); #else @@ -745,7 +745,7 @@ void PlayerManager::OnSourceModLevelEnd() if (m_Players[i].IsConnected()) { #if SOURCE_ENGINE == SE_DOTA - OnClientDisconnect(m_Players[i].GetIndex()); + OnClientDisconnect(m_Players[i].GetIndex(), 0); #else OnClientDisconnect(m_Players[i].GetEdict()); #endif @@ -755,7 +755,7 @@ void PlayerManager::OnSourceModLevelEnd() } #if SOURCE_ENGINE == SE_DOTA -void PlayerManager::OnClientDisconnect(CEntityIndex index) +void PlayerManager::OnClientDisconnect(CEntityIndex index, int reason) { int client = index.Get(); edict_t *pEntity = PEntityOfEntIndex(client); @@ -801,7 +801,7 @@ void PlayerManager::OnClientDisconnect(edict_t *pEntity) } #if SOURCE_ENGINE == SE_DOTA -void PlayerManager::OnClientDisconnect_Post(CEntityIndex index) +void PlayerManager::OnClientDisconnect_Post(CEntityIndex index, int reason) { int client = index.Get(); edict_t *pEntity = PEntityOfEntIndex(client); diff --git a/core/PlayerManager.h b/core/PlayerManager.h index acb92d91..67850c54 100644 --- a/core/PlayerManager.h +++ b/core/PlayerManager.h @@ -156,8 +156,8 @@ public: bool OnClientConnect(CEntityIndex index, const char *pszName, const char *pszAddress, char *reject, int maxrejectlen); bool OnClientConnect_Post(CEntityIndex index, const char *pszName, const char *pszAddress, char *reject, int maxrejectlen); void OnClientPutInServer(CEntityIndex index, char const *playername); - void OnClientDisconnect(CEntityIndex index); - void OnClientDisconnect_Post(CEntityIndex index); + void OnClientDisconnect(CEntityIndex index, int reason); + void OnClientDisconnect_Post(CEntityIndex index, int reason); void OnClientCommand(CEntityIndex index, const CCommand &args); void OnClientSettingsChanged(CEntityIndex index); //void OnClientSettingsChanged_Pre(CEntityIndex client);