mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
Fixing more merge errors. I'm bad at this
This commit is contained in:
@@ -149,11 +149,39 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
//spawnPacket.DebugPrintSubPacket();
|
||||
|
||||
return spawnPacket;
|
||||
}
|
||||
}
|
||||
|
||||
public SubPacket CreatePositionUpdatePacket(uint playerActorId)
|
||||
public SubPacket CreatePositionUpdatePacket(bool forceUpdate = false)
|
||||
{
|
||||
return MoveActorToPositionPacket.BuildPacket(actorId, playerActorId, positionX, positionY, positionZ, rotation, moveState);
|
||||
int updateMs = 300;
|
||||
var diffTime = (DateTime.Now - lastMoveUpdate);
|
||||
|
||||
if (this.target != null)
|
||||
{
|
||||
updateMs = 150;
|
||||
}
|
||||
|
||||
if (forceUpdate || (hasMoved && ((this is Player) || diffTime.Milliseconds >= updateMs)))
|
||||
{
|
||||
hasMoved = (this.positionUpdates != null && this.positionUpdates.Count > 0);
|
||||
if (hasMoved)
|
||||
{
|
||||
var pos = positionUpdates[0];
|
||||
|
||||
if (this is Character)
|
||||
((Character)this).OnPath(pos);
|
||||
|
||||
positionX = pos.X;
|
||||
positionY = pos.Y;
|
||||
positionZ = pos.Z;
|
||||
//Program.Server.GetInstance().mLuaEngine.OnPath(actor, position, positionUpdates)
|
||||
|
||||
positionUpdates.RemoveAt(0);
|
||||
}
|
||||
lastMoveUpdate = DateTime.Now;
|
||||
return MoveActorToPositionPacket.BuildPacket(actorId, positionX, positionY, positionZ, rotation, moveState);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public SubPacket CreateStatePacket()
|
||||
|
Reference in New Issue
Block a user