Update for Dota IServerGameClient changes.
authorNicholas Hastings <skamonkey@gmail.com>
Sun Apr 06 17:03:29 2014 -0400 (2014-04-06)
changeset 4312c189d81f7bf4
parent 4311 4a8a6eba08f8
child 4313 ef638270abbf
Update for Dota IServerGameClient changes.
core/PlayerManager.cpp
core/PlayerManager.h
     1.1 --- a/core/PlayerManager.cpp	Sun Apr 06 17:03:14 2014 -0400
     1.2 +++ b/core/PlayerManager.cpp	Sun Apr 06 17:03:29 2014 -0400
     1.3 @@ -60,7 +60,7 @@
     1.4  #if SOURCE_ENGINE == SE_DOTA
     1.5  SH_DECL_HOOK5(IServerGameClients, ClientConnect, SH_NOATTRIB, 0, bool, CEntityIndex, const char *, const char *, char *, int);
     1.6  SH_DECL_HOOK2_void(IServerGameClients, ClientPutInServer, SH_NOATTRIB, 0, CEntityIndex, const char *);
     1.7 -SH_DECL_HOOK1_void(IServerGameClients, ClientDisconnect, SH_NOATTRIB, 0, CEntityIndex);
     1.8 +SH_DECL_HOOK2_void(IServerGameClients, ClientDisconnect, SH_NOATTRIB, 0, CEntityIndex, int);
     1.9  SH_DECL_HOOK2_void(IServerGameClients, ClientCommand, SH_NOATTRIB, 0, CEntityIndex, const CCommand &);
    1.10  SH_DECL_HOOK1_void(IServerGameClients, ClientSettingsChanged, SH_NOATTRIB, 0, CEntityIndex);
    1.11  #else
    1.12 @@ -745,7 +745,7 @@
    1.13  		if (m_Players[i].IsConnected())
    1.14  		{
    1.15  #if SOURCE_ENGINE == SE_DOTA
    1.16 -			OnClientDisconnect(m_Players[i].GetIndex());
    1.17 +			OnClientDisconnect(m_Players[i].GetIndex(), 0);
    1.18  #else
    1.19  			OnClientDisconnect(m_Players[i].GetEdict());
    1.20  #endif
    1.21 @@ -755,7 +755,7 @@
    1.22  }
    1.23  
    1.24  #if SOURCE_ENGINE == SE_DOTA
    1.25 -void PlayerManager::OnClientDisconnect(CEntityIndex index)
    1.26 +void PlayerManager::OnClientDisconnect(CEntityIndex index, int reason)
    1.27  {
    1.28  	int client = index.Get();
    1.29  	edict_t *pEntity = PEntityOfEntIndex(client);
    1.30 @@ -801,7 +801,7 @@
    1.31  }
    1.32  
    1.33  #if SOURCE_ENGINE == SE_DOTA
    1.34 -void PlayerManager::OnClientDisconnect_Post(CEntityIndex index)
    1.35 +void PlayerManager::OnClientDisconnect_Post(CEntityIndex index, int reason)
    1.36  {
    1.37  	int client = index.Get();
    1.38  	edict_t *pEntity = PEntityOfEntIndex(client);
     2.1 --- a/core/PlayerManager.h	Sun Apr 06 17:03:14 2014 -0400
     2.2 +++ b/core/PlayerManager.h	Sun Apr 06 17:03:29 2014 -0400
     2.3 @@ -156,8 +156,8 @@
     2.4  	bool OnClientConnect(CEntityIndex index, const char *pszName, const char *pszAddress, char *reject, int maxrejectlen);
     2.5  	bool OnClientConnect_Post(CEntityIndex index, const char *pszName, const char *pszAddress, char *reject, int maxrejectlen);
     2.6  	void OnClientPutInServer(CEntityIndex index, char const *playername);
     2.7 -	void OnClientDisconnect(CEntityIndex index);
     2.8 -	void OnClientDisconnect_Post(CEntityIndex index);
     2.9 +	void OnClientDisconnect(CEntityIndex index, int reason);
    2.10 +	void OnClientDisconnect_Post(CEntityIndex index, int reason);
    2.11  	void OnClientCommand(CEntityIndex index, const CCommand &args);
    2.12  	void OnClientSettingsChanged(CEntityIndex index);
    2.13  	//void OnClientSettingsChanged_Pre(CEntityIndex client);