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()))
|
if (!_owner.containsKey(event.getEntity()))
|
||||||
return;
|
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()))
|
if (_owner.get(event.getEntity()).equals(event.getTarget()))
|
||||||
{
|
{
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
@ -288,6 +299,16 @@ public class PerkSlimeRocket extends SmashPerk implements IThrown
|
|||||||
//if (owner != null)
|
//if (owner != null)
|
||||||
// event.SetDamager(owner); This gives knockback from wrong direction :(
|
// 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()))
|
if (owner != null && owner.equals(event.GetDamageeEntity()))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user