diff --git a/docs/src/progress/renderertodo.md b/docs/src/progress/renderertodo.md index 7c04a4f6..6562db25 100644 --- a/docs/src/progress/renderertodo.md +++ b/docs/src/progress/renderertodo.md @@ -2087,6 +2087,7 @@ Standardize data sourcing in MacroTemporalData Macro pathfinding scaffolding Macro pathfinding work Actual macro pathfinding implementation +Enable AI for low-lod entities diff --git a/src/main/java/electrosphere/server/ai/AI.java b/src/main/java/electrosphere/server/ai/AI.java index 592e780a..07432c84 100644 --- a/src/main/java/electrosphere/server/ai/AI.java +++ b/src/main/java/electrosphere/server/ai/AI.java @@ -8,7 +8,6 @@ import electrosphere.data.entity.creature.ai.BlockerTreeData; import electrosphere.data.entity.creature.ai.StandardCharacterTreeData; import electrosphere.entity.Entity; import electrosphere.entity.EntityDataStrings; -import electrosphere.entity.state.lod.ServerLODComponent; import electrosphere.entity.state.movement.groundmove.ServerGroundMovementTree; import electrosphere.entity.types.creature.CreatureUtils; import electrosphere.logger.LoggerInterface; @@ -141,11 +140,6 @@ public class AI { * @return true if should simulate, false otherwise */ public boolean shouldExecute(){ - if(ServerLODComponent.hasServerLODComponent(this.parent)){ - if(ServerLODComponent.getServerLODComponent(this.parent).getLodLevel() == ServerLODComponent.LOW_RES){ - return false; - } - } return this.applyToPlayer || !CreatureUtils.hasControllerPlayerId(this.parent); } diff --git a/src/main/java/electrosphere/server/ai/AIManager.java b/src/main/java/electrosphere/server/ai/AIManager.java index 49ecde43..60223237 100644 --- a/src/main/java/electrosphere/server/ai/AIManager.java +++ b/src/main/java/electrosphere/server/ai/AIManager.java @@ -24,47 +24,47 @@ public class AIManager { /** * Lock for thread-safeing the manager */ - ReentrantLock lock = new ReentrantLock(); + private ReentrantLock lock = new ReentrantLock(); /** * The list of ais */ - List aiList = new LinkedList(); + private List aiList = new LinkedList(); /** * The map of ai to associated entity */ - Map aiEntityMap = new HashMap(); + private Map aiEntityMap = new HashMap(); /** * The map of entity to associated ai */ - Map entityAIMap = new HashMap(); + private Map entityAIMap = new HashMap(); /** * Controls whether the ai manager should simulate each frame or not */ - boolean active = true; + private boolean active = true; /** * The timer service */ - TimerService timerService = new TimerService(); + private TimerService timerService = new TimerService(); /** * The nearby entity service */ - NearbyEntityService nearbyEntityService = new NearbyEntityService(); + private NearbyEntityService nearbyEntityService = new NearbyEntityService(); /** * Service for performing pathfinding */ - PathfindingService pathfindingService = new PathfindingService(); + private PathfindingService pathfindingService = new PathfindingService(); /** * The random of the ai */ - Random random = null; + private Random random = null; /** * Constructor