enable ai for low-lod entities
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
This commit is contained in:
parent
414707f6d5
commit
4a17a757ed
@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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<AI> aiList = new LinkedList<AI>();
|
||||
private List<AI> aiList = new LinkedList<AI>();
|
||||
|
||||
/**
|
||||
* The map of ai to associated entity
|
||||
*/
|
||||
Map<AI,Entity> aiEntityMap = new HashMap<AI,Entity>();
|
||||
private Map<AI,Entity> aiEntityMap = new HashMap<AI,Entity>();
|
||||
|
||||
/**
|
||||
* The map of entity to associated ai
|
||||
*/
|
||||
Map<Entity,AI> entityAIMap = new HashMap<Entity,AI>();
|
||||
private Map<Entity,AI> entityAIMap = new HashMap<Entity,AI>();
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user