From e636cbc8f582508c0233b23de616e96998560b77 Mon Sep 17 00:00:00 2001 From: s1lentq Date: Fri, 12 Jan 2024 09:16:20 +0700 Subject: [PATCH] PlayerRelationship: GR_TEAMMATE on checking itself --- regamedll/dlls/multiplay_gamerules.cpp | 3 +++ regamedll/dlls/player.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/regamedll/dlls/multiplay_gamerules.cpp b/regamedll/dlls/multiplay_gamerules.cpp index 90d47582..c8ce2896 100644 --- a/regamedll/dlls/multiplay_gamerules.cpp +++ b/regamedll/dlls/multiplay_gamerules.cpp @@ -4341,6 +4341,9 @@ edict_t *EXT_FUNC CHalfLifeMultiplay::__API_HOOK(GetPlayerSpawnSpot)(CBasePlayer int CHalfLifeMultiplay::PlayerRelationship(CBasePlayer *pPlayer, CBaseEntity *pTarget) { + if (pPlayer == pTarget) + return GR_TEAMMATE; + #ifdef REGAMEDLL_ADD if (IsFreeForAll()) { diff --git a/regamedll/dlls/player.cpp b/regamedll/dlls/player.cpp index 82c9b984..e2770a03 100644 --- a/regamedll/dlls/player.cpp +++ b/regamedll/dlls/player.cpp @@ -3663,7 +3663,7 @@ void EXT_FUNC CBasePlayer::__API_HOOK(JoiningThink)() } if (m_pIntroCamera && gpGlobals->time >= m_fIntroCamTime -#ifdef REGAMEDLL_FIXES +#ifdef REGAMEDLL_FIXES && m_fIntroCamTime > 0.0 // update only if cameras are available #endif )