mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-10-18 08:02:53 -04:00
fixed null pointer at disconnect
This commit is contained in:
@@ -1580,7 +1580,8 @@ public class CreatureObject extends TangibleObject implements IPersistent {
|
||||
synchronized(objectMutex) {
|
||||
this.performanceListenee = performanceListenee;
|
||||
}
|
||||
getClient().getSession().write(messageBuilder.buildListenToId(performanceListenee.getObjectId()));
|
||||
if(getClient() != null)
|
||||
getClient().getSession().write(messageBuilder.buildListenToId(performanceListenee.getObjectId()));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -144,8 +144,8 @@ public abstract class AIState {
|
||||
|
||||
} else {
|
||||
newX = currentPathPosition.x;
|
||||
newY = currentPathPosition.y;
|
||||
newZ = currentPathPosition.z;
|
||||
newY = core.terrainService.getHeight(creature.getPlanetId(), newX, newX);
|
||||
}
|
||||
oldPosition = currentPathPosition;
|
||||
}
|
||||
|
||||
@@ -76,6 +76,7 @@ public class AttackState extends AIState {
|
||||
actor.setNextPosition(actor.getFollowObject().getPosition());
|
||||
else {
|
||||
//recover(actor);
|
||||
actor.faceObject(actor.getFollowObject());
|
||||
actor.scheduleMovement();
|
||||
return StateResult.UNFINISHED;
|
||||
}
|
||||
@@ -136,7 +137,7 @@ public class AttackState extends AIState {
|
||||
actor.scheduleRecovery();
|
||||
return StateResult.UNFINISHED;
|
||||
}
|
||||
actor.faceObject(target);
|
||||
//actor.faceObject(target);
|
||||
|
||||
Vector<String> attacks = actor.getMobileTemplate().getAttacks();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user