From aae507c9f5a6883cd4478eed0d1f20f4519b5632 Mon Sep 17 00:00:00 2001 From: s1lentq Date: Mon, 4 Jan 2021 22:26:35 +0700 Subject: [PATCH] CHalfLifeMultiplay::SwapAllPlayers: Ignore HLTV --- regamedll/dlls/multiplay_gamerules.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/regamedll/dlls/multiplay_gamerules.cpp b/regamedll/dlls/multiplay_gamerules.cpp index ff687dab..cd7f5b61 100644 --- a/regamedll/dlls/multiplay_gamerules.cpp +++ b/regamedll/dlls/multiplay_gamerules.cpp @@ -1502,6 +1502,12 @@ void CHalfLifeMultiplay::SwapAllPlayers() if (pEntity->IsDormant()) continue; +#ifdef REGAMEDLL_FIXES + // ignore HLTV + if (pEntity->IsProxy()) + continue; +#endif + CBasePlayer *pPlayer = GetClassPtr((CBasePlayer *)pEntity->pev); pPlayer->SwitchTeam(); }