Fix freeze projectiles only hit one tee (Fixes #1759)

This commit is contained in:
fokkonaut 2019-05-29 16:28:38 +02:00
parent 39303e3430
commit bbbdd89e64

View file

@ -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)))