mirror of
https://github.com/ProjectSWGCore/Holocore.git
synced 2026-10-07 22:13:40 -04:00
Two stabs in the dark to attempt fixing LD issue
This commit is contained in:
@@ -114,10 +114,10 @@ public class ObjectAwareness extends Service {
|
||||
switch (pei.getEvent()) {
|
||||
case PE_DISAPPEAR:
|
||||
DebugUtilities.printPlayerCharacterDebug(this, (CreatureObject) creature, "Disappearing");
|
||||
creature.clearAware();
|
||||
remove(creature);
|
||||
for (SWGObject obj : creature.getObservers())
|
||||
creature.destroyObject(obj.getOwner());
|
||||
creature.clearAware();
|
||||
creature.setOwner(null);
|
||||
p.setCreatureObject(null);
|
||||
break;
|
||||
@@ -332,6 +332,8 @@ public class ObjectAwareness extends Service {
|
||||
private boolean isValidInRange(SWGObject obj, SWGObject inRange, Location objLoc) {
|
||||
if (inRange.getObjectId() == obj.getObjectId())
|
||||
return false;
|
||||
if (obj.hasSlot("ghost") && obj.getOwner() == null)
|
||||
return false;
|
||||
int distSquared = distanceSquared(objLoc, inRange.getWorldLocation());
|
||||
int loadSquared = (int) (square(inRange.getLoadRange()) + 0.5);
|
||||
return (loadSquared != 0 || distSquared <= DEFAULT_LOAD_RANGE) && (loadSquared == 0 || distSquared <= loadSquared);
|
||||
|
||||
Reference in New Issue
Block a user