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

This commit is contained in:
Nicholas Hastings 2017-06-23 11:27:37 -04:00
parent 9a6900a0ba
commit 16d7e39b57

View File

@ -1974,11 +1974,14 @@ 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));
if (pNetChan)
{ {
m_pIClient = static_cast<IClient *>(pNetChan->GetMsgHandler()); INetChannel *pNetChan = static_cast<INetChannel *>(engine->GetPlayerNetInfo(m_iIndex));
if (pNetChan)
{
m_pIClient = static_cast<IClient *>(pNetChan->GetMsgHandler());
}
} }
#endif #endif