From be72f7ea9090a4b4c408066820c75adebc6af29d Mon Sep 17 00:00:00 2001 From: Spencer Date: Sun, 31 Dec 2017 22:15:11 -0500 Subject: [PATCH] Fix HE grenades doing damage to teammates if the thrower died --- .../minestrike/items/grenades/HighExplosive.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minestrike/items/grenades/HighExplosive.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minestrike/items/grenades/HighExplosive.java index 40cf79898..fd37c482d 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minestrike/items/grenades/HighExplosive.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minestrike/items/grenades/HighExplosive.java @@ -44,12 +44,27 @@ public class HighExplosive extends Grenade ent.getWorld().playSound(ent.getLocation(), Sound.EXPLODE, 3f, 0.8f); + + HashMap players = UtilPlayer.getInRadius(ent.getLocation(), 9); List damagedPlayers = new ArrayList<>(); + + GameTeam throwerTeam = game.getHost().GetTeam(_thrower); + for (Player player : players.keySet()) { if (!game.getHost().IsAlive(player)) continue; + + if (throwerTeam != null && !_thrower.equals(player)) + { + GameTeam damagedTeam = game.getHost().GetTeam(player); + + if (damagedTeam != null && throwerTeam.equals(damagedTeam)) + { + continue; + } + } // Damage Event Player damager = null;