Browse Source

Probably fixed random turn offs

master
Gitea 2 years ago
parent
commit
214a851c6f
  1. 7
      src/xyz/unbewohnte/albionFisher/fisher.java

7
src/xyz/unbewohnte/albionFisher/fisher.java

@ -114,7 +114,6 @@ public class fisher {
// fishing logic // fishing logic
boolean windowActivated = false; boolean windowActivated = false;
boolean needToRecast = false;
int idleCountMsMax = 35000; // 35 seconds int idleCountMsMax = 35000; // 35 seconds
int idleCountMs = 0; int idleCountMs = 0;
while (true) { while (true) {
@ -122,6 +121,7 @@ public class fisher {
if (!fishing) { if (!fishing) {
windowActivated = false; windowActivated = false;
idleCountMs = 0;
continue; continue;
} }
@ -170,11 +170,9 @@ public class fisher {
// wait for fish as long as the user does not move the mouse // wait for fish as long as the user does not move the mouse
idleCountMs = 0; idleCountMs = 0;
needToRecast = false;
while (true) { while (true) {
if (idleCountMs >= idleCountMsMax) { if (idleCountMs >= idleCountMsMax) {
// something must be wrong // something must be wrong
needToRecast = true;
break; break;
} }
@ -213,7 +211,8 @@ public class fisher {
// play minigame if still fishing // play minigame if still fishing
lastMean = 0.0f; lastMean = 0.0f;
currentMean = 0.0f; currentMean = 0.0f;
if (!fishing || needToRecast) { if (!fishing || idleCountMs >= idleCountMsMax) {
idleCountMs = 0;
continue; continue;
}; };

Loading…
Cancel
Save