mirror of
https://github.com/ACEmulator/ACE
synced 2026-08-17 12:26:06 -04:00
* Change >> 1) & 1 to & 2 Cosmetic change pointed out by Rawaho. * Better fix of the Portal Flags in the dat code * ACE.DatLoader refactoring This new code format uses extention methods to re-use code. It allows decouples object unpacking from DatReader and reduces the dependancy to a simple BinaryReader. * Forgot to remove the temp StarterAreas code from the transition * Some files were ignored, not sure why. This should fix
47 lines
1 KiB
C#
47 lines
1 KiB
C#
using System.IO;
|
|
|
|
namespace ACE.DatLoader.Entity
|
|
{
|
|
// TODO: refactor to use existing Position object
|
|
public class Loc : IUnpackable
|
|
{
|
|
public int Cell;
|
|
public float X;
|
|
public float Y;
|
|
public float Z;
|
|
public float QW;
|
|
public float QX;
|
|
public float QY;
|
|
public float QZ;
|
|
|
|
public Loc()
|
|
{
|
|
}
|
|
|
|
public Loc(int cell, float x, float y, float z, float qw, float qx, float qy, float qz)
|
|
{
|
|
Cell = cell;
|
|
X = x;
|
|
Y = y;
|
|
Z = z;
|
|
QW = qw;
|
|
QX = qx;
|
|
QY = qy;
|
|
QZ = qz;
|
|
}
|
|
|
|
public void Unpack(BinaryReader reader)
|
|
{
|
|
Cell = reader.ReadInt32();
|
|
|
|
X = reader.ReadSingle();
|
|
Y = reader.ReadSingle();
|
|
Z = reader.ReadSingle();
|
|
|
|
QW = reader.ReadSingle();
|
|
QX = reader.ReadSingle();
|
|
QY = reader.ReadSingle();
|
|
QZ = reader.ReadSingle();
|
|
}
|
|
}
|
|
}
|