internal void RefreshMovementCache()
{
if (DateTime.Now.Subtract(LastUpdatedMovementData).TotalMilliseconds < 150)
return;
LastUpdatedMovementData = DateTime.Now;
//These vars are used to accuratly predict what the bot is doing (Melee Movement/Combat)
using (ZetaDia.Memory.AcquireFrame())
{
// If we aren't in the game of a world is loading, don't do anything yet
if (!ZetaDia.IsInGame || ZetaDia.IsLoadingWorld)
return;
try
{
ActorMovement botMovement = ZetaDia.Me.Movement;
isMoving = botMovement.IsMoving;
curSpeedXY = botMovement.SpeedXY;
curRotation = botMovement.Rotation;
curMoveState = botMovement.MovementState;
stuckflags = botMovement.StuckFlags;
}
catch
{
}
}
}