Fixed snowman turret targeting team mates
This commit is contained in:
parent
82f1ec1ac6
commit
74d6c599b5
|
@ -106,7 +106,7 @@ public class SmashSnowman extends SmashUltimate
|
||||||
{
|
{
|
||||||
Snowman snowman = turretIter.next();
|
Snowman snowman = turretIter.next();
|
||||||
Player player = _turret.get(snowman);
|
Player player = _turret.get(snowman);
|
||||||
Player target = UtilPlayer.getClosest(snowman.getLocation(), player);
|
Player target = UtilPlayer.getClosest(snowman.getLocation(), Manager.GetGame().GetTeam(player).GetPlayers(true));
|
||||||
|
|
||||||
if (target == null)
|
if (target == null)
|
||||||
{
|
{
|
||||||
|
@ -151,7 +151,9 @@ public class SmashSnowman extends SmashUltimate
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_snowball.containsKey(proj))
|
Player damager = _snowball.get(proj);
|
||||||
|
|
||||||
|
if (damager == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -165,7 +167,7 @@ public class SmashSnowman extends SmashUltimate
|
||||||
|
|
||||||
event.SetCancelled("Turret");
|
event.SetCancelled("Turret");
|
||||||
|
|
||||||
if (damagee.equals(_snowball.get(proj)))
|
if(Manager.GetGame().GetTeam(damager).GetPlayers(true).contains(damagee))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -183,7 +185,7 @@ public class SmashSnowman extends SmashUltimate
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Manager.GetDamage().NewDamageEvent(damagee, _snowball.get(proj), null, DamageCause.PROJECTILE, 2, false, true, false, UtilEnt.getName(_snowball.get(proj)), GetName());
|
Manager.GetDamage().NewDamageEvent(damagee, damager, null, DamageCause.PROJECTILE, 2, false, true, false, UtilEnt.getName(_snowball.get(proj)), GetName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
|
Loading…
Reference in New Issue