fix DIVE aim: drop per-tick teleport (was locking camera), MoveEvent-only position lock; higher launch
This commit is contained in:
@@ -26,8 +26,10 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
public class SkyDiveAttack implements Listener {
|
||||
private static final float COST = 87.5f;
|
||||
private static final double DAMAGE = 25.0;
|
||||
private static final double LAUNCH_UP = 1.3;
|
||||
private static final double LAUNCH_UP = 1.6;
|
||||
private static final double LAUNCH_FORWARD = 0.4;
|
||||
private static final double APEX_HEIGHT = 7.5;
|
||||
private static final int LAUNCH_TIMEOUT = 18;
|
||||
private static final double DASH_SPEED = 2.8;
|
||||
private static final long FREEZE_TICKS = 30L;
|
||||
private static final long FALL_IMMUNE_MS = 8000L;
|
||||
@@ -78,7 +80,7 @@ public class SkyDiveAttack implements Listener {
|
||||
ticks++;
|
||||
double gained = p.getLocation().getY() - startY;
|
||||
Vector v = p.getVelocity();
|
||||
if (v.getY() <= 0.25 || gained >= 5.5 || ticks >= 14) {
|
||||
if (v.getY() <= 0.25 || gained >= APEX_HEIGHT || ticks >= LAUNCH_TIMEOUT) {
|
||||
cancel();
|
||||
freeze(p, plugin);
|
||||
}
|
||||
@@ -104,10 +106,8 @@ public class SkyDiveAttack implements Listener {
|
||||
if (!p.isOnline() || p.isDead()) { cleanup(p); cancel(); return; }
|
||||
Location anchor = frozen.get(p.getUniqueId());
|
||||
if (anchor == null) { cancel(); return; }
|
||||
Location cur = p.getLocation();
|
||||
anchor.setYaw(cur.getYaw());
|
||||
anchor.setPitch(cur.getPitch());
|
||||
p.teleport(anchor);
|
||||
// Без телепортов: позицию держит onMove, камера свободна.
|
||||
// Телепорт каждый тик слал клиенту зафиксированный поворот и давил движения мыши.
|
||||
p.setVelocity(new Vector(0, 0, 0));
|
||||
p.setFallDistance(0);
|
||||
for (int k = 0; k < 10; k++) {
|
||||
|
||||
Reference in New Issue
Block a user