From 5fe8ed88a6771f88d547e605a8365a9675c058c3 Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 4 Nov 2021 22:30:19 -0400 Subject: [PATCH] Fixed #6305 --- core/src/mindustry/entities/comp/BuildingComp.java | 2 +- core/src/mindustry/world/blocks/defense/OverdriveProjector.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/entities/comp/BuildingComp.java b/core/src/mindustry/entities/comp/BuildingComp.java index eb5490446c..1217d98073 100644 --- a/core/src/mindustry/entities/comp/BuildingComp.java +++ b/core/src/mindustry/entities/comp/BuildingComp.java @@ -269,7 +269,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc, public void applyBoost(float intensity, float duration){ //do not refresh time scale when getting a weaker intensity - if(intensity >= this.timeScale){ + if(intensity >= this.timeScale - 0.001f){ timeScaleDuration = Math.max(timeScaleDuration, duration); } timeScale = Math.max(timeScale, intensity); diff --git a/core/src/mindustry/world/blocks/defense/OverdriveProjector.java b/core/src/mindustry/world/blocks/defense/OverdriveProjector.java index 3dc1c19bf7..1286147421 100644 --- a/core/src/mindustry/world/blocks/defense/OverdriveProjector.java +++ b/core/src/mindustry/world/blocks/defense/OverdriveProjector.java @@ -76,7 +76,7 @@ public class OverdriveProjector extends Block{ @Override public void setBars(){ super.setBars(); - bars.add("boost", (OverdriveBuild entity) -> new Bar(() -> Core.bundle.format("bar.boost", Math.max((int)(entity.realBoost() * 100 - 100), 0)), () -> Pal.accent, () -> entity.realBoost() / (hasBoost ? speedBoost + speedBoostPhase : speedBoost))); + bars.add("boost", (OverdriveBuild entity) -> new Bar(() -> Core.bundle.format("bar.boost", Mathf.round(Math.max((entity.realBoost() * 100 - 100), 0))), () -> Pal.accent, () -> entity.realBoost() / (hasBoost ? speedBoost + speedBoostPhase : speedBoost))); } public class OverdriveBuild extends Building implements Ranged{