From 1aba8dfb118d53630964245a60ff6ea845bbc2a4 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 31 Dec 2024 17:44:27 -0600 Subject: [PATCH] bane mechanic thread --- src/engine/workthreads/BaneThread.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/engine/workthreads/BaneThread.java b/src/engine/workthreads/BaneThread.java index cfd1a3ab..66cb0d72 100644 --- a/src/engine/workthreads/BaneThread.java +++ b/src/engine/workthreads/BaneThread.java @@ -53,13 +53,14 @@ public class BaneThread implements Runnable { public void run() { lastRun = System.currentTimeMillis(); while (true) { - if(lastRun + instancedelay < System.currentTimeMillis()) - this.processBanesWindow(); - lastRun = System.currentTimeMillis(); + if (System.currentTimeMillis() >= lastRun + instancedelay) { // Correct condition + this.processBanesWindow(); + lastRun = System.currentTimeMillis(); // Update lastRun after processing + } } - } + public static void startBaneThread() { Thread baneThread; baneThread = new Thread(new BaneThread());