From 214a851c6f64253307b24ad562c66cc591e0b8cc Mon Sep 17 00:00:00 2001 From: Gitea Date: Sat, 18 Jun 2022 17:45:56 +0300 Subject: [PATCH] Probably fixed random turn offs --- src/xyz/unbewohnte/albionFisher/fisher.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/xyz/unbewohnte/albionFisher/fisher.java b/src/xyz/unbewohnte/albionFisher/fisher.java index e6633dd..0f5c747 100644 --- a/src/xyz/unbewohnte/albionFisher/fisher.java +++ b/src/xyz/unbewohnte/albionFisher/fisher.java @@ -114,7 +114,6 @@ public class fisher { // fishing logic boolean windowActivated = false; - boolean needToRecast = false; int idleCountMsMax = 35000; // 35 seconds int idleCountMs = 0; while (true) { @@ -122,6 +121,7 @@ public class fisher { if (!fishing) { windowActivated = false; + idleCountMs = 0; continue; } @@ -170,11 +170,9 @@ public class fisher { // wait for fish as long as the user does not move the mouse idleCountMs = 0; - needToRecast = false; while (true) { if (idleCountMs >= idleCountMsMax) { // something must be wrong - needToRecast = true; break; } @@ -213,7 +211,8 @@ public class fisher { // play minigame if still fishing lastMean = 0.0f; currentMean = 0.0f; - if (!fishing || needToRecast) { + if (!fishing || idleCountMs >= idleCountMsMax) { + idleCountMs = 0; continue; };