From d09240d11a6e2ca994257f3ff782a1a40e46f47d Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Thu, 18 Apr 2024 18:43:23 -0500 Subject: [PATCH] only start thread for mine being set to active --- src/engine/objects/Mine.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/engine/objects/Mine.java b/src/engine/objects/Mine.java index 796a62f9..e005df3d 100644 --- a/src/engine/objects/Mine.java +++ b/src/engine/objects/Mine.java @@ -575,9 +575,11 @@ public class Mine extends AbstractGameObject { if (building != null && !this.isActive) building.isDeranking.compareAndSet(true, false); - Thread zergMechanicThread = new Thread(new ZergMechanicThread(null, this)); - zergMechanicThread.setName(this.zoneName + "Mine"); - zergMechanicThread.start(); + if(isAc) { + Thread zergMechanicThread = new Thread(new ZergMechanicThread(null, this)); + zergMechanicThread.setName(this.zoneName + "Mine"); + zergMechanicThread.start(); + } } public boolean validForMine(Resource r) {