mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Make ninja work only on team mebers
This commit is contained in:
parent
8f9a1c24fb
commit
3cfe974092
|
@ -184,6 +184,10 @@ void CCharacter::HandleNinja()
|
|||
if (distance(aEnts[i]->m_Pos, m_Pos) > (m_ProximityRadius * 2.0f))
|
||||
continue;
|
||||
|
||||
// Don't hit players in other teams
|
||||
if (Team() != aEnts[i]->Team())
|
||||
continue;
|
||||
|
||||
// Hit a player, give him damage and stuffs...
|
||||
GameServer()->CreateSound(aEnts[i]->m_Pos, SOUND_NINJA_HIT, Teams()->TeamMask(Team(), -1, m_pPlayer->GetCID()));
|
||||
// set his velocity to fast upward (for now)
|
||||
|
|
Loading…
Reference in a new issue