From 8cb52c61424544304c531708aa89f8521e9e2f23 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Thu, 13 Jun 2024 18:27:09 -0500 Subject: [PATCH] zerg multiplier resets for players after mine closes --- src/engine/gameManager/SimulationManager.java | 2 +- src/engine/workthreads/HalfHourlyJobThread.java | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/engine/gameManager/SimulationManager.java b/src/engine/gameManager/SimulationManager.java index fe7ec7e6..a34804a1 100644 --- a/src/engine/gameManager/SimulationManager.java +++ b/src/engine/gameManager/SimulationManager.java @@ -201,7 +201,7 @@ public enum SimulationManager { city.onEnter(); } for(Mine mine : Mine.getMines()){ - if(mine != null) + if(mine != null && mine.isActive) mine.onEnter(); } _cityPulseTime = System.currentTimeMillis() + CITY_PULSE; diff --git a/src/engine/workthreads/HalfHourlyJobThread.java b/src/engine/workthreads/HalfHourlyJobThread.java index 8b878e26..623d1af4 100644 --- a/src/engine/workthreads/HalfHourlyJobThread.java +++ b/src/engine/workthreads/HalfHourlyJobThread.java @@ -146,6 +146,11 @@ public class HalfHourlyJobThread implements Runnable { mine.lastClaimer = null; mine.setActive(false); mine.wasClaimed = true; + for(Integer id : mine._playerMemory){ + PlayerCharacter pc = PlayerCharacter.getFromCache(id); + if(pc != null) + pc.ZergMultiplier = 1.0f; + } return true; }