fixed crash on updating controller for npcs

- fixed updating player movement
This commit is contained in:
Tahir Akhlaq
2017-06-30 02:38:55 +01:00
parent 62055eff04
commit e56238a10c
4 changed files with 8 additions and 5 deletions

View File

@@ -152,7 +152,8 @@ namespace FFXIVClassic_Map_Server.Actors
{
updateMs = 150;
}
if (hasMoved && diffTime.Milliseconds >= updateMs)
if (hasMoved && ((this is Player ) || diffTime.Milliseconds >= updateMs))
{
hasMoved = (this.positionUpdates != null && this.positionUpdates.Count > 0);
if (hasMoved)

View File

@@ -161,8 +161,6 @@ namespace FFXIVClassic_Map_Server.Actors
public void UpdateActorPosition(Actor actor)
{
this.hasMoved = true;
int gridX = (int)actor.positionX / boundingGridSize;
int gridY = (int)actor.positionZ / boundingGridSize;

View File

@@ -44,7 +44,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai
// todo: trigger listeners
// todo: action queues
controller.Update(tick);
controller?.Update(tick);
}
public void CheckCompletedStates()