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
784 B
C#
32 lines
784 B
C#
using System.IO;
|
|
using System.Numerics;
|
|
|
|
namespace ACE.Server.Network.Structure
|
|
{
|
|
public static class Extensions
|
|
{
|
|
public static Vector3 ReadVector3(this BinaryReader reader)
|
|
{
|
|
var v = new Vector3();
|
|
|
|
v.X = reader.ReadSingle();
|
|
v.Y = reader.ReadSingle();
|
|
v.Z = reader.ReadSingle();
|
|
|
|
return v;
|
|
}
|
|
|
|
public static Quaternion ReadQuaternion(this BinaryReader reader)
|
|
{
|
|
// note that AC sends quaternions with the W-component first...
|
|
var q = new Quaternion();
|
|
|
|
q.W = reader.ReadSingle();
|
|
q.X = reader.ReadSingle();
|
|
q.Y = reader.ReadSingle();
|
|
q.Z = reader.ReadSingle();
|
|
|
|
return q;
|
|
}
|
|
}
|
|
}
|