mirror of
https://github.com/ACEmulator/ACE
synced 2026-08-17 12:26:06 -04:00
* Fixing jump in multiplayer, refactoring movement and animation systems for network and game layers * Fixing stamina dropping to 0 while running * Fixing some monsters getting stuck if they wakeup during idle emote * Reverting position * Fixing magic aftercast speed
32 lines
992 B
C#
32 lines
992 B
C#
using System.IO;
|
|
using ACE.Entity;
|
|
using ACE.Server.Entity;
|
|
|
|
namespace ACE.Server.Network.Structure
|
|
{
|
|
public class TurnToObject
|
|
{
|
|
public ObjectGuid Target;
|
|
public float DesiredHeading; // heading of the object to turn to.
|
|
// this is used instead of the DesiredHeading in the TurnToParameters
|
|
public TurnToParameters TurnToParameters; // set of turning parameters
|
|
|
|
public TurnToObject(Motion motion)
|
|
{
|
|
Target = motion.TargetGuid;
|
|
DesiredHeading = motion.DesiredHeading;
|
|
|
|
TurnToParameters = new TurnToParameters(motion);
|
|
}
|
|
}
|
|
|
|
public static class TurnToObjectExtensions
|
|
{
|
|
public static void Write(this BinaryWriter writer, TurnToObject turnTo)
|
|
{
|
|
writer.WriteGuid(turnTo.Target);
|
|
writer.Write(turnTo.DesiredHeading);
|
|
writer.Write(turnTo.TurnToParameters);
|
|
}
|
|
}
|
|
}
|