mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-10-15 05:13:14 -04:00
Fixed #0000063
- Fixed: Incap timer reset to 10s -Fixed NPC AI not deathblowing when it should - Added: NPCs now engage factional enemies
This commit is contained in:
@@ -277,6 +277,16 @@ public class SimulationService implements INetworkDispatch {
|
||||
);
|
||||
return checkObject.get();
|
||||
}
|
||||
|
||||
public Vector<CreatureObject> getAllNearNPCs(int distance, SWGObject value ){
|
||||
Vector<CreatureObject> foundCreatures = new Vector<CreatureObject>();
|
||||
core.simulationService.get(value.getPlanet(), value.getWorldPosition().x, value.getWorldPosition().z, distance).stream().forEach((objecta) -> {
|
||||
if (objecta instanceof CreatureObject)
|
||||
foundCreatures.add((CreatureObject)objecta);
|
||||
}
|
||||
);
|
||||
return foundCreatures;
|
||||
}
|
||||
|
||||
public boolean move(SWGObject object, int oldX, int oldZ, int newX, int newZ) {
|
||||
if(quadTrees.get(object.getPlanet().getName()).remove(oldX, oldZ, object)) {
|
||||
|
||||
Reference in New Issue
Block a user