Ink Blaster changes
This commit is contained in:
parent
6d4a68acdf
commit
0f925dd655
@ -37,6 +37,7 @@ public class PerkInkBlast extends SmashPerk implements IThrown
|
|||||||
{
|
{
|
||||||
|
|
||||||
private int _cooldown;
|
private int _cooldown;
|
||||||
|
private float _spread;
|
||||||
private float _projectileVelocity;
|
private float _projectileVelocity;
|
||||||
private int _knockbackMagnitude;
|
private int _knockbackMagnitude;
|
||||||
private int _bullets;
|
private int _bullets;
|
||||||
@ -51,6 +52,7 @@ public class PerkInkBlast extends SmashPerk implements IThrown
|
|||||||
public void setupValues()
|
public void setupValues()
|
||||||
{
|
{
|
||||||
_cooldown = getPerkTime("Cooldown");
|
_cooldown = getPerkTime("Cooldown");
|
||||||
|
_spread = getPerkFloat("Spread");
|
||||||
_projectileVelocity = getPerkFloat("Projectile Velocity");
|
_projectileVelocity = getPerkFloat("Projectile Velocity");
|
||||||
_knockbackMagnitude = getPerkInt("Knockback Magnitude");
|
_knockbackMagnitude = getPerkInt("Knockback Magnitude");
|
||||||
_bullets = getPerkInt("Bullets");
|
_bullets = getPerkInt("Bullets");
|
||||||
@ -106,7 +108,7 @@ public class PerkInkBlast extends SmashPerk implements IThrown
|
|||||||
Item ent = player.getWorld().dropItem(player.getEyeLocation().add(player.getLocation().getDirection()), ItemStackFactory.Instance.CreateStack(Material.INK_SACK, (byte) 0, 1, "Ink" + Math
|
Item ent = player.getWorld().dropItem(player.getEyeLocation().add(player.getLocation().getDirection()), ItemStackFactory.Instance.CreateStack(Material.INK_SACK, (byte) 0, 1, "Ink" + Math
|
||||||
.random()));
|
.random()));
|
||||||
|
|
||||||
Vector random = new Vector(Math.random() - 0.5, Math.random() - 0.5, Math.random() - 0.5);
|
Vector random = new Vector((Math.random() - 0.5) * _spread, (Math.random() - 0.5) * _spread, (Math.random() - 0.5) * _spread);
|
||||||
random.normalize();
|
random.normalize();
|
||||||
random.multiply(_projectileVelocity);
|
random.multiply(_projectileVelocity);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user