Unneeded if statement

This commit is contained in:
Sam 2017-05-13 15:34:39 +01:00
parent 321acce3c3
commit 85a384bad7

View File

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