Added a mechanism for logging players out and making them disappear

This commit is contained in:
Obique
2015-01-13 00:36:34 -06:00
committed by Obique
parent 2ffa24da94
commit 1a0e2a604b
5 changed files with 121 additions and 1 deletions
+5
View File
@@ -63,6 +63,7 @@ public class ObjectManager extends Manager {
public boolean initialize() {
registerForIntent(SWGObjectEventIntent.TYPE);
registerForIntent(GalacticPacketIntent.TYPE);
registerForIntent(PlayerEventIntent.TYPE);
for (Terrain t : Terrain.values()) {
quadTree.put(t, new QuadTree<SWGObject>(-8192, -8192, 8192, 8192));
}
@@ -123,6 +124,10 @@ public class ObjectManager extends Manager {
moveObject(trans, obj, oldLocation, newLocation);
}
}
} else if (i instanceof PlayerEventIntent) {
if (((PlayerEventIntent)i).getEvent() == PlayerEvent.PE_DISAPPEAR) {
((PlayerEventIntent)i).getPlayer().getCreatureObject().clearAware();
}
}
}