mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 09:38:19 +00:00
Merge pull request #8856 from ChillerDragon/pr_gun_damage
Call TakeDamage on projectile and laser hit (gun, shotgun and laser)
This commit is contained in:
commit
871f97a283
|
@ -94,6 +94,7 @@ bool CLaser::HitCharacter(vec2 From, vec2 To)
|
|||
{
|
||||
pHit->UnFreeze();
|
||||
}
|
||||
pHit->TakeDamage(vec2(0, 0), 0, m_Owner, m_Type);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -177,6 +177,8 @@ void CProjectile::Tick()
|
|||
pChr->Freeze();
|
||||
}
|
||||
}
|
||||
else if(pTargetChr)
|
||||
pTargetChr->TakeDamage(vec2(0, 0), 0, m_Owner, m_Type);
|
||||
|
||||
if(pOwnerChar && !GameLayerClipped(ColPos) &&
|
||||
((m_Type == WEAPON_GRENADE && pOwnerChar->HasTelegunGrenade()) || (m_Type == WEAPON_GUN && pOwnerChar->HasTelegunGun())))
|
||||
|
|
Loading…
Reference in a new issue