From e96f7f121763d9137c55f3addb287e466571fb42 Mon Sep 17 00:00:00 2001 From: Sam Date: Sun, 3 Jul 2016 15:58:54 +0100 Subject: [PATCH] PC-508 Fixes a hit box issue with Rocket Slimes --- .../arcade/kit/perks/PerkSlimeRocket.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkSlimeRocket.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkSlimeRocket.java index b296469af..0bf4780f1 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkSlimeRocket.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkSlimeRocket.java @@ -209,6 +209,17 @@ public class PerkSlimeRocket extends SmashPerk implements IThrown if (!_owner.containsKey(event.getEntity())) return; + if (Manager.GetGame() instanceof TeamSuperSmash && event.getTarget() instanceof Player) + { + TeamSuperSmash smash = (TeamSuperSmash) Manager.GetGame(); + Player targetPlayer = (Player) event.getTarget(); + + if (smash.GetTeam(_owner.get(event.getEntity())).equals(smash.GetTeam(targetPlayer))) + { + event.setCancelled(true); + } + } + if (_owner.get(event.getEntity()).equals(event.getTarget())) { event.setCancelled(true); @@ -288,6 +299,16 @@ public class PerkSlimeRocket extends SmashPerk implements IThrown //if (owner != null) // event.SetDamager(owner); This gives knockback from wrong direction :( + if (Manager.GetGame() instanceof TeamSuperSmash) + { + TeamSuperSmash smash = (TeamSuperSmash) Manager.GetGame(); + + if (smash.GetTeam(owner).equals(smash.GetTeam(event.GetDamageePlayer()))) + { + event.SetCancelled("Team Damage"); + return; + } + } if (owner != null && owner.equals(event.GetDamageeEntity())) {