fixed players being able to be pushed into portals by gadgets
This commit is contained in:
parent
a0e9d6f6fd
commit
27587a2a11
|
@ -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()),
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue