mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge #1760
1760: Fix freeze projectiles only hit one tee (Fixes #1759) r=def- a=fokkonaut Co-authored-by: fokkonaut <35420825+fokkonaut@users.noreply.github.com>
This commit is contained in:
commit
1578a33628
|
@ -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[apEnts[i]->Team()])))
|
||||
apEnts[i]->Freeze();
|
||||
}
|
||||
|
||||
if (pOwnerChar && ColPos && !GameLayerClipped(ColPos) &&
|
||||
((m_Type == WEAPON_GRENADE && pOwnerChar->m_HasTeleGrenade) || (m_Type == WEAPON_GUN && pOwnerChar->m_HasTeleGun)))
|
||||
|
|
Loading…
Reference in a new issue