diff --git a/core/src/mindustry/graphics/OverlayRenderer.java b/core/src/mindustry/graphics/OverlayRenderer.java index 853304e7b2..14e9927e9c 100644 --- a/core/src/mindustry/graphics/OverlayRenderer.java +++ b/core/src/mindustry/graphics/OverlayRenderer.java @@ -131,7 +131,9 @@ public class OverlayRenderer{ Building build = (select instanceof BlockUnitc b ? b.tile() : select instanceof Building b ? b : null); TextureRegion region = build != null ? build.block.fullIcon : select instanceof Unit u ? u.icon() : Core.atlas.white(); - Draw.rect(region, select.getX(), select.getY(), select instanceof Unit u && !(select instanceof BlockUnitc) ? u.rotation - 90f : 0f); + if(!(select instanceof Unitc)){ + Draw.rect(region, select.getX(), select.getY()); + } for(int i = 0; i < 4; i++){ float rot = i * 90f + 45f + (-Time.time) % 360f; @@ -255,6 +257,12 @@ public class OverlayRenderer{ } } + public void checkApplySelection(Unit u){ + if(unitFade > 0 && lastSelect == u){ + Draw.mixcol(Pal.accent, unitFade); + } + } + private static class CoreEdge{ float x1, y1, x2, y2; Team t1, t2; diff --git a/core/src/mindustry/type/UnitType.java b/core/src/mindustry/type/UnitType.java index b9f7ecd089..04ca534adc 100644 --- a/core/src/mindustry/type/UnitType.java +++ b/core/src/mindustry/type/UnitType.java @@ -1465,6 +1465,7 @@ public class UnitType extends UnlockableContent implements Senseable{ } public void drawTank(T unit){ + applyColor(unit); Draw.rect(treadRegion, unit.x, unit.y, unit.rotation - 90); if(treadRegion.found()){ @@ -1636,6 +1637,10 @@ public class UnitType extends UnlockableContent implements Senseable{ if(unit.drownTime > 0 && unit.lastDrownFloor != null){ Draw.mixcol(Tmp.c1.set(unit.lastDrownFloor.mapColor).mul(0.83f), unit.drownTime * 0.9f); } + //this is horribly scuffed. + if(renderer != null && renderer.overlays != null){ + renderer.overlays.checkApplySelection(unit); + } } //endregion diff --git a/gradle.properties b/gradle.properties index 25be0e37a2..025014ab41 100644 --- a/gradle.properties +++ b/gradle.properties @@ -25,4 +25,4 @@ org.gradle.caching=true #used for slow jitpack builds; TODO see if this actually works org.gradle.internal.http.socketTimeout=100000 org.gradle.internal.http.connectionTimeout=100000 -archash=8a2decd656 +archash=e812c7a008