From 7f71f43c2e066654334f9b6c99aed8f2a6175032 Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Sat, 24 Jun 2017 08:34:42 -0400 Subject: [PATCH] Another oops-fix for SDK 2013 mods. Thanks @Ne3tCode --- core/PlayerManager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/PlayerManager.cpp b/core/PlayerManager.cpp index 199f156e..80963e8f 100644 --- a/core/PlayerManager.cpp +++ b/core/PlayerManager.cpp @@ -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(engine->GetPlayerNetInfo(m_iIndex)); if (pNetChan)