Fix Boat Trails Being Drawn on Land (#5340)

* update

* Revert "update"

This reverts commit 6ff3523276.

* Hacky Implementation

* Revert "Hacky Implementation"

This reverts commit 632121312d.

* Not so Hacky Implementation

Co-authored-by: Leonwang4234 <62972692+Leonwang4234@users.noreply.github.com>
Co-authored-by: Leonwang4234 <leonwang4234@gmail.com>
Co-authored-by: Anuken <arnukren@gmail.com>
This commit is contained in:
genNAowl
2021-06-03 11:31:23 -07:00
committed by GitHub
parent f1cf1efe32
commit 6d28098180
2 changed files with 5 additions and 1 deletions

View File

@@ -15,6 +15,8 @@ import mindustry.type.*;
import mindustry.world.*;
import mindustry.world.blocks.environment.*;
import static mindustry.Vars.*;
@Component
abstract class WaterMoveComp implements Posc, Velc, Hitboxc, Flyingc, Unitc{
@Import float x, y, rotation;
@@ -31,7 +33,7 @@ abstract class WaterMoveComp implements Posc, Velc, Hitboxc, Flyingc, Unitc{
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;
t.update(cx, cy);
t.update(cx, cy, world.floorWorld(cx, cy).isLiquid ? 1 : 0);
}
}