From 85a384bad735e18734e4784e92519003adf97b90 Mon Sep 17 00:00:00 2001 From: Sam Date: Sat, 13 May 2017 15:34:39 +0100 Subject: [PATCH] Unneeded if statement --- .../game/games/moba/kit/common/DashSkill.java | 30 +++++++------------ 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/moba/kit/common/DashSkill.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/moba/kit/common/DashSkill.java index b9e51c378..e3ff6f068 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/moba/kit/common/DashSkill.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/moba/kit/common/DashSkill.java @@ -186,29 +186,21 @@ public class DashSkill extends HeroSkill continue; } - // If allowing collisions with players - if (entity instanceof Player) + // If not allowing collisions with players + if (!_collidePlayers) { - if (!_collidePlayers) - { - continue; - } - - boolean sameTeam = isTeamDamage(entity, player); - - // If their teams are the same and we don't allow collisions with teammates, ignore - if (sameTeam && !_collideTeammates) - { - continue; - } - - collideEntity(entity, player, scale, sameTeam); + continue; } - // Any other entities and if we allow collisions with them - else if (_collideEntities) + + boolean sameTeam = isTeamDamage(entity, player); + + // If their teams are the same and we don't allow collisions with teammates, ignore + if (sameTeam && !_collideTeammates) { - collideEntity(entity, player, scale, false); + continue; } + + collideEntity(entity, player, scale, sameTeam); } }