Another oops-fix for SDK 2013 mods.

Thanks @Ne3tCode
This commit is contained in:
Nicholas Hastings 2017-06-24 08:34:42 -04:00
parent 16d7e39b57
commit 7f71f43c2e

View File

@ -1967,7 +1967,8 @@ void CPlayer::Initialize(const char *name, const char *ip, edict_t *pEntity)
|| SOURCE_ENGINE == SE_BMS \
|| SOURCE_ENGINE == SE_INSURGENCY
m_pIClient = engine->GetIServer()->GetClient(m_iIndex - 1);
#elif SOURCE_ENGINE == SE_SDK2013
#else
#if SOURCE_ENGINE == SE_SDK2013
// Source SDK 2013 mods that ship on Steam can be using older engine binaries
static IVEngineServer *engine22 = (IVEngineServer *)(g_SMAPI->GetEngineFactory()("VEngineServer022", nullptr));
if (engine22)
@ -1975,7 +1976,7 @@ void CPlayer::Initialize(const char *name, const char *ip, edict_t *pEntity)
m_pIClient = engine22->GetIServer()->GetClient(m_iIndex - 1);
}
else
#else
#endif
{
INetChannel *pNetChan = static_cast<INetChannel *>(engine->GetPlayerNetInfo(m_iIndex));
if (pNetChan)