Oops. Fix non-bot IClient lookups for older SDK 2013 mods.

This commit is contained in:
Nicholas Hastings
2017-06-23 14:43:39 -04:00
parent 9a6900a0ba
commit 16d7e39b57
+3
View File
@@ -1974,12 +1974,15 @@ void CPlayer::Initialize(const char *name, const char *ip, edict_t *pEntity)
{ {
m_pIClient = engine22->GetIServer()->GetClient(m_iIndex - 1); m_pIClient = engine22->GetIServer()->GetClient(m_iIndex - 1);
} }
else
#else #else
{
INetChannel *pNetChan = static_cast<INetChannel *>(engine->GetPlayerNetInfo(m_iIndex)); INetChannel *pNetChan = static_cast<INetChannel *>(engine->GetPlayerNetInfo(m_iIndex));
if (pNetChan) if (pNetChan)
{ {
m_pIClient = static_cast<IClient *>(pNetChan->GetMsgHandler()); m_pIClient = static_cast<IClient *>(pNetChan->GetMsgHandler());
} }
}
#endif #endif
UpdateAuthIds(); UpdateAuthIds();