From acc0c1dc46a8be7f1f3f4ef16110ac29fb34a582 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Fri, 8 Mar 2024 22:09:25 -0600 Subject: [PATCH] zerg test fixes --- src/engine/gameManager/ZergManager.java | 2 +- src/engine/workthreads/HourlyJobThread.java | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/engine/gameManager/ZergManager.java b/src/engine/gameManager/ZergManager.java index 04e545fd..069f8175 100644 --- a/src/engine/gameManager/ZergManager.java +++ b/src/engine/gameManager/ZergManager.java @@ -253,7 +253,7 @@ public class ZergManager { float returnMultiplier = 1.0f; if(source.ZergMultiplier > 0 && target.ZergMultiplier > 0){ if(source.ZergMultiplier > target.ZergMultiplier) { - returnMultiplier = 1 + (target.ZergMultiplier - source.ZergMultiplier); + returnMultiplier = 1 + (source.ZergMultiplier - target.ZergMultiplier); } else{ returnMultiplier = 1.0f; } diff --git a/src/engine/workthreads/HourlyJobThread.java b/src/engine/workthreads/HourlyJobThread.java index a29bd839..24bc76a6 100644 --- a/src/engine/workthreads/HourlyJobThread.java +++ b/src/engine/workthreads/HourlyJobThread.java @@ -158,6 +158,12 @@ public class HourlyJobThread implements Runnable { return false; } + for(Integer id : mine._playerMemory ){ + PlayerCharacter.getPlayerCharacter(id).ZergMultiplier = 1.0f; + } + for(Integer id : mine._recentMemory.keySet()){ + PlayerCharacter.getPlayerCharacter(id).ZergMultiplier = 1.0f; + } // Mine building still stands; nothing to do. // We can early exit here.