mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-24 22:57:50 +07:00
Update WaterMoveComp.java (#5504)
This commit is contained in:
@ -19,7 +19,7 @@ import static mindustry.Vars.*;
|
|||||||
|
|
||||||
@Component
|
@Component
|
||||||
abstract class WaterMoveComp implements Posc, Velc, Hitboxc, Flyingc, Unitc{
|
abstract class WaterMoveComp implements Posc, Velc, Hitboxc, Flyingc, Unitc{
|
||||||
@Import float x, y, rotation;
|
@Import float x, y, rotation, speedMultiplier;
|
||||||
@Import UnitType type;
|
@Import UnitType type;
|
||||||
|
|
||||||
private transient Trail tleft = new Trail(1), tright = new Trail(1);
|
private transient Trail tleft = new Trail(1), tright = new Trail(1);
|
||||||
@ -74,7 +74,7 @@ abstract class WaterMoveComp implements Posc, Velc, Hitboxc, Flyingc, Unitc{
|
|||||||
@Replace
|
@Replace
|
||||||
public float floorSpeedMultiplier(){
|
public float floorSpeedMultiplier(){
|
||||||
Floor on = isFlying() ? Blocks.air.asFloor() : floorOn();
|
Floor on = isFlying() ? Blocks.air.asFloor() : floorOn();
|
||||||
return on.isDeep() ? 1.3f : 1f;
|
return (on.isDeep() ? 1.3f : 1f) * speedMultiplier;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean onLiquid(){
|
public boolean onLiquid(){
|
||||||
|
Reference in New Issue
Block a user