Fixed naval units with canBoost = true
This commit is contained in:
@@ -27,13 +27,14 @@ abstract class WaterMoveComp implements Posc, Velc, Hitboxc, Flyingc, Unitc{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void update(){
|
public void update(){
|
||||||
|
boolean flying = isFlying();
|
||||||
for(int i = 0; i < 2; i++){
|
for(int i = 0; i < 2; i++){
|
||||||
Trail t = i == 0 ? tleft : tright;
|
Trail t = i == 0 ? tleft : tright;
|
||||||
t.length = type.trailLength;
|
t.length = type.trailLength;
|
||||||
|
|
||||||
int sign = i == 0 ? -1 : 1;
|
int sign = i == 0 ? -1 : 1;
|
||||||
float cx = Angles.trnsx(rotation - 90, type.trailX * sign, type.trailY) + x, cy = Angles.trnsy(rotation - 90, type.trailX * sign, type.trailY) + y;
|
float cx = Angles.trnsx(rotation - 90, type.trailX * sign, type.trailY) + x, cy = Angles.trnsy(rotation - 90, type.trailX * sign, type.trailY) + y;
|
||||||
t.update(cx, cy, world.floorWorld(cx, cy).isLiquid ? 1 : 0);
|
t.update(cx, cy, world.floorWorld(cx, cy).isLiquid && !flying ? 1 : 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,6 +72,13 @@ abstract class WaterMoveComp implements Posc, Velc, Hitboxc, Flyingc, Unitc{
|
|||||||
return isFlying() ? null : EntityCollisions::waterSolid;
|
return isFlying() ? null : EntityCollisions::waterSolid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Replace
|
||||||
|
@Override
|
||||||
|
public boolean onSolid(){
|
||||||
|
Tile tile = tileOn();
|
||||||
|
return tile == null || tile.solid() || EntityCollisions.waterSolid(tile.x, tile.y);
|
||||||
|
}
|
||||||
|
|
||||||
@Replace
|
@Replace
|
||||||
public float floorSpeedMultiplier(){
|
public float floorSpeedMultiplier(){
|
||||||
Floor on = isFlying() ? Blocks.air.asFloor() : floorOn();
|
Floor on = isFlying() ? Blocks.air.asFloor() : floorOn();
|
||||||
|
|||||||
@@ -11,4 +11,4 @@ android.useAndroidX=true
|
|||||||
#used for slow jitpack builds; TODO see if this actually works
|
#used for slow jitpack builds; TODO see if this actually works
|
||||||
http.socketTimeout=80000
|
http.socketTimeout=80000
|
||||||
http.connectionTimeout=80000
|
http.connectionTimeout=80000
|
||||||
archash=4410a18d881622cb655c9d48e4cb0ff2ec40782f
|
archash=f9d704c4e88dfc9772e1e956268cfe8414f7b133
|
||||||
|
|||||||
Reference in New Issue
Block a user