mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
fixed crash on updating controller for npcs
- fixed updating player movement
This commit is contained in:
@@ -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)
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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()
|
||||
|
Reference in New Issue
Block a user