fixed players being able to be pushed into portals by gadgets

This commit is contained in:
Chiss 2014-09-19 11:15:48 +10:00
parent a0e9d6f6fd
commit 27587a2a11
3 changed files with 10 additions and 0 deletions

View File

@ -68,6 +68,10 @@ public class ItemFleshHook extends ItemGadget implements IThrown
if (target == null) if (target == null)
return; return;
if (target instanceof Player)
if (Manager.collideEvent(this, (Player) target))
return;
//Pull //Pull
UtilAction.velocity(target, UtilAction.velocity(target,
UtilAlg.getTrajectory(target.getLocation(), player.getLocation()), UtilAlg.getTrajectory(target.getLocation(), player.getLocation()),

View File

@ -110,6 +110,9 @@ public class MorphCreeper extends MorphGadget
if (other.equals(player)) if (other.equals(player))
continue; continue;
if (Manager.collideEvent(this, other))
continue;
double mult = players.get(other); double mult = players.get(other);
//Knockback //Knockback

View File

@ -135,6 +135,9 @@ public class MorphPig extends MorphGadget
if (UtilMath.offset(player, other) > range) if (UtilMath.offset(player, other) > range)
continue; continue;
if (Manager.collideEvent(this, other))
continue;
//Cooldown //Cooldown
Recharge.Instance.useForce(other, GetName() + " Collide", 200); Recharge.Instance.useForce(other, GetName() + " Collide", 200);
Recharge.Instance.useForce(player, GetName() + " Collide", 200); Recharge.Instance.useForce(player, GetName() + " Collide", 200);