Fixes a hit box issue with Rocket Slimes
This commit is contained in:
Sam 2016-07-03 15:58:54 +01:00
parent bdc049efe1
commit e96f7f1217

View File

@ -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()))
{