mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Add a slight vertical jump to entities when performing a stomp
This commit is contained in:
parent
73b1f8bd42
commit
368e965025
1 changed files with 3 additions and 1 deletions
|
@ -96,9 +96,11 @@ public class EarthPonyStompAbility implements Ability<Hit> {
|
|||
}
|
||||
inertia /= heavyness;
|
||||
|
||||
double liftAmount = Math.sin(Math.PI * dist / rad) * 12;
|
||||
|
||||
i.addVelocity(
|
||||
-(player.getX() - i.getX()) / inertia,
|
||||
-(player.getY() - i.getY() - 2) / inertia + (dist < 1 ? dist : 0),
|
||||
-(player.getY() - i.getY() - liftAmount) / inertia + (dist < 1 ? dist : 0),
|
||||
-(player.getZ() - i.getZ()) / inertia);
|
||||
|
||||
DamageSource damage = MagicalDamageSource.create("smash", player);
|
||||
|
|
Loading…
Reference in a new issue