Make ninja work only on team mebers

This commit is contained in:
def 2013-08-02 21:10:43 +02:00
parent 8f9a1c24fb
commit 3cfe974092

View file

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