fix DIVE: allow creative, feedback messages, segment hit sampling; tune GRENADE faster flight + 10t cd
This commit is contained in:
@@ -24,6 +24,8 @@ public class GrenadeAttack {
|
||||
private static final double LETHAL_DAMAGE = 35.0;
|
||||
private static final double CHIP_DAMAGE = 5.5;
|
||||
private static final double MAX_RANGE = 15.0;
|
||||
private static final double TICKS_PER_BLOCK = 2.0;
|
||||
private static final int MIN_DURATION = 8;
|
||||
private static final double ARC_MIN = 1.5;
|
||||
private static final double ARC_PER_BLOCK = 0.25;
|
||||
private static final double ARC_MAX = 4.0;
|
||||
@@ -39,7 +41,7 @@ public class GrenadeAttack {
|
||||
Vector dir = eye.getDirection().normalize();
|
||||
Location target = computeTarget(p, eye, dir);
|
||||
double dist = eye.distance(target);
|
||||
int duration = Math.max(10, (int) (dist * 3));
|
||||
int duration = Math.max(MIN_DURATION, (int) (dist * TICKS_PER_BLOCK));
|
||||
double arcH = Math.max(ARC_MIN, Math.min(ARC_MAX, dist * ARC_PER_BLOCK));
|
||||
Location spawn = eye.clone().add(dir.clone().multiply(1)).add(0, 0.2, 0);
|
||||
Vector throwDir = target.clone().subtract(spawn).toVector().normalize();
|
||||
@@ -133,7 +135,7 @@ public class GrenadeAttack {
|
||||
flightStart = cur.clone();
|
||||
flightTarget = nt.clone();
|
||||
double remaining = Math.max(1.0, cur.distance(nt));
|
||||
flightDuration = Math.max(6, (int) (remaining * 3));
|
||||
flightDuration = Math.max(6, (int) (remaining * TICKS_PER_BLOCK));
|
||||
elapsed = 0;
|
||||
arc = Math.max(ARC_MIN, Math.min(ARC_MAX, remaining * ARC_PER_BLOCK));
|
||||
targetWasSolid = flightTarget.getBlock().isSolid();
|
||||
|
||||
Reference in New Issue
Block a user