From bbbdd89e648e151ba4a88045c28222112045fb99 Mon Sep 17 00:00:00 2001 From: fokkonaut <35420825+fokkonaut@users.noreply.github.com> Date: Wed, 29 May 2019 16:28:38 +0200 Subject: [PATCH] Fix freeze projectiles only hit one tee (Fixes #1759) --- src/game/server/entities/projectile.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/game/server/entities/projectile.cpp b/src/game/server/entities/projectile.cpp index a590aea9b..2062f6223 100644 --- a/src/game/server/entities/projectile.cpp +++ b/src/game/server/entities/projectile.cpp @@ -168,8 +168,14 @@ void CProjectile::Tick() (m_Owner != -1)? TeamMask : -1LL); } } - else if(pTargetChr && m_Freeze && ((m_Layer == LAYER_SWITCH && GameServer()->Collision()->m_pSwitchers[m_Number].m_Status[pTargetChr->Team()]) || m_Layer != LAYER_SWITCH)) - pTargetChr->Freeze(); + else if(m_Freeze) + { + CCharacter *apEnts[MAX_CLIENTS]; + int Num = GameWorld()->FindEntities(CurPos, 1.0f, (CEntity**)apEnts, MAX_CLIENTS, CGameWorld::ENTTYPE_CHARACTER); + for (int i = 0; i < Num; ++i) + if (apEnts[i] && (m_Layer != LAYER_SWITCH || (m_Layer == LAYER_SWITCH && GameServer()->Collision()->m_pSwitchers[m_Number].m_Status[pTargetChr->Team()]))) + apEnts[i]->Freeze(); + } if (pOwnerChar && ColPos && !GameLayerClipped(ColPos) && ((m_Type == WEAPON_GRENADE && pOwnerChar->m_HasTeleGrenade) || (m_Type == WEAPON_GUN && pOwnerChar->m_HasTeleGun)))