From 32070a37f789af599ad60cf0cb9b2aad0678d408 Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 14 Jan 2021 11:26:16 -0500 Subject: [PATCH] Fixed #4325 --- .../world/blocks/distribution/MassDriver.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/core/src/mindustry/world/blocks/distribution/MassDriver.java b/core/src/mindustry/world/blocks/distribution/MassDriver.java index eb3409b1cd..67c4c23191 100644 --- a/core/src/mindustry/world/blocks/distribution/MassDriver.java +++ b/core/src/mindustry/world/blocks/distribution/MassDriver.java @@ -175,11 +175,14 @@ public class MassDriver extends Block{ Angles.near(rotation, targetRotation, 2f) && Angles.near(other.rotation, targetRotation + 180f, 2f)){ //actually fire fire(other); - //remove waiting shooters, it's done firing - other.waitingShooters.remove(tile); - //set both states to idle + float timeToArrive = Math.min(bulletLifetime, dst(other) / bulletSpeed); + Time.run(timeToArrive, () -> { + //remove waiting shooters, it's done firing + other.waitingShooters.remove(tile); + other.state = DriverState.idle; + }); + //driver is immediately idle state = DriverState.idle; - other.state = DriverState.idle; } } }