Fixed naval units with canBoost = true

This commit is contained in:
Anuken
2021-08-22 00:35:40 -04:00
parent f85c078de8
commit 466118319f
2 changed files with 10 additions and 2 deletions

View File

@@ -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();

View File

@@ -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