This commit is contained in:
Anuken
2025-10-21 14:22:37 -04:00
parent b78cd5bbd9
commit 9f7817f70e
9 changed files with 42 additions and 16 deletions

View File

@@ -1003,7 +1003,6 @@ public class MobileInput extends InputHandler implements GestureListener{
float attractDst = 15f;
float speed = unit.speed();
float range = unit.hasWeapons() ? unit.range() : 0f;
float bulletSpeed = unit.hasWeapons() ? type.weapons.first().bullet.speed : 0f;
float mouseAngle = unit.angleTo(unit.aimX(), unit.aimY());
boolean aimCursor = omni && player.shooting && type.hasWeapons() && !boosted && type.faceTarget;
@@ -1081,7 +1080,7 @@ public class MobileInput extends InputHandler implements GestureListener{
//this may be a bad idea, aiming for a point far in front could work better, test it out
unit.aim(Core.input.mouseWorldX(), Core.input.mouseWorldY());
}else{
Vec2 intercept = player.unit().type.weapons.contains(w -> w.predictTarget) ? Predict.intercept(unit, target, bulletSpeed) : Tmp.v1.set(target);
Vec2 intercept = player.unit().type.weapons.contains(w -> w.predictTarget) ? Predict.intercept(unit, target, type.weapons.first().bullet) : Tmp.v1.set(target);
player.mouseX = intercept.x;
player.mouseY = intercept.y;