Fixed #4325
This commit is contained in:
@@ -175,11 +175,14 @@ public class MassDriver extends Block{
|
|||||||
Angles.near(rotation, targetRotation, 2f) && Angles.near(other.rotation, targetRotation + 180f, 2f)){
|
Angles.near(rotation, targetRotation, 2f) && Angles.near(other.rotation, targetRotation + 180f, 2f)){
|
||||||
//actually fire
|
//actually fire
|
||||||
fire(other);
|
fire(other);
|
||||||
//remove waiting shooters, it's done firing
|
float timeToArrive = Math.min(bulletLifetime, dst(other) / bulletSpeed);
|
||||||
other.waitingShooters.remove(tile);
|
Time.run(timeToArrive, () -> {
|
||||||
//set both states to idle
|
//remove waiting shooters, it's done firing
|
||||||
|
other.waitingShooters.remove(tile);
|
||||||
|
other.state = DriverState.idle;
|
||||||
|
});
|
||||||
|
//driver is immediately idle
|
||||||
state = DriverState.idle;
|
state = DriverState.idle;
|
||||||
other.state = DriverState.idle;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user