From 0608d47219fee14174221ee48ed1fe743be54b2f Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Wed, 9 Apr 2014 13:17:18 -0400 Subject: [PATCH] Update for Dota IClient changes. --- core/PlayerManager.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/PlayerManager.cpp b/core/PlayerManager.cpp index 8c7d57a7..c490d1a8 100644 --- a/core/PlayerManager.cpp +++ b/core/PlayerManager.cpp @@ -2107,7 +2107,12 @@ void CPlayer::Kick(const char *str) else { IClient *pClient = static_cast(pNetChan->GetMsgHandler()); -#if SOURCE_ENGINE == SE_DOTA || SOURCE_ENGINE == SE_CSGO +#if SOURCE_ENGINE == SE_DOTA + // Including network_connection.pb.h (and .cpp) is overkill for just this. -p + // Copied from ENetworkDisconnectionReason enum + const int NETWORK_DISCONNECT_KICKED = 39; + pClient->Disconnect(NETWORK_DISCONNECT_KICKED); +#elif SOURCE_ENGINE == SE_CSGO pClient->Disconnect(str); #else pClient->Disconnect("%s", str);