mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-03-27 01:01:09 -07:00
Forced hovering while on block
This commit is contained in:
parent
dbb164f4be
commit
3bf72a1af6
2 changed files with 5 additions and 6 deletions
|
|
@ -500,9 +500,11 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
|
|||
achievedFlight = false;
|
||||
}
|
||||
|
||||
isBoosting = Inputs.keyDown("dash") && !mech.flying;
|
||||
|
||||
//if player is in solid block
|
||||
if(tile != null && tile.solid() && !isFlying()){
|
||||
damage(health + 1); //die instantly
|
||||
if(tile != null && tile.solid()){
|
||||
isBoosting = true;
|
||||
}
|
||||
|
||||
float speed = isBoosting && !mech.flying ? mech.boostSpeed : mech.speed;
|
||||
|
|
@ -526,8 +528,7 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
|
|||
}else if(getCarry() != null){
|
||||
dropCarry();
|
||||
}else{
|
||||
Unit unit = Units.getClosest(team, x, y, 8f,
|
||||
u -> !u.isFlying() && u.getMass() <= mech.carryWeight);
|
||||
Unit unit = Units.getClosest(team, x, y, 8f, u -> !u.isFlying() && u.getMass() <= mech.carryWeight);
|
||||
|
||||
if(unit != null){
|
||||
carry(unit);
|
||||
|
|
|
|||
|
|
@ -168,8 +168,6 @@ public class DesktopInput extends InputHandler{
|
|||
Settings.save();
|
||||
}
|
||||
|
||||
player.isBoosting = Inputs.keyDown("dash");
|
||||
|
||||
//deslect if not placing
|
||||
if(!isPlacing() && mode == placing){
|
||||
mode = none;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue