PC-508
Fixes a hit box issue with Rocket Slimes
This commit is contained in:
parent
bdc049efe1
commit
e96f7f1217
@ -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()))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user