revert mob ai

This commit is contained in:
2025-03-28 16:19:58 -05:00
parent 7e66b290bd
commit b51eb34410
2 changed files with 14 additions and 15 deletions
+3 -4
View File
@@ -28,6 +28,7 @@ public class MobAIThread implements Runnable{
AI_CAST_FREQUENCY = Float.parseFloat(ConfigManager.MB_AI_CAST_FREQUENCY.getValue());
AI_BASE_AGGRO_RANGE = (int)(60 * Float.parseFloat(ConfigManager.MB_AI_AGGRO_RANGE.getValue()));
while (true) {
try {
for (Zone zone : ZoneManager.getAllZones()) {
if (zone != null && zone.zoneMobSet != null) {
synchronized (zone.zoneMobSet) {
@@ -43,11 +44,9 @@ public class MobAIThread implements Runnable{
}
}
}
try {
Thread.sleep(100);
} catch (InterruptedException e) {
Logger.error("AI Thread interrupted", e);
Thread.currentThread().interrupt();
}catch(Exception e){
Logger.error(e.getMessage());
}
}
}
+1 -1
View File
@@ -38,7 +38,7 @@ public class BaneThread implements Runnable {
while (true) {
try {
BaneManager.pulse_banes();
Thread.sleep(100); // Pause for 100ms to reduce CPU usage
Thread.sleep(1000); // Pause for 100ms to reduce CPU usage
} catch (InterruptedException e) {
Logger.error("Thread interrupted", e);
Thread.currentThread().interrupt();