Updated DB2 structs

This commit is contained in:
hondacrx
2018-02-26 13:13:54 -05:00
parent 0a3dfaba37
commit 82dca6de94
61 changed files with 2639 additions and 2517 deletions
@@ -173,8 +173,8 @@ namespace Game.Collision
displayId = reader.ReadUInt32();
name_length = reader.ReadUInt32();
name = reader.ReadString((int)name_length);
v1 = reader.ReadStruct<Vector3>();
v2 = reader.ReadStruct<Vector3>();
v1 = reader.Read<Vector3>();
v2 = reader.Read<Vector3>();
StaticModelList.models.Add(displayId, new GameobjectModelData(name, new AxisAlignedBox(v1, v2)));
}
@@ -50,15 +50,15 @@ namespace Game.Collision
spawn.flags = reader.ReadUInt32();
spawn.adtId = reader.ReadUInt16();
spawn.ID = reader.ReadUInt32();
spawn.iPos = reader.ReadStruct<Vector3>();
spawn.iRot = reader.ReadStruct<Vector3>();
spawn.iPos = reader.Read<Vector3>();
spawn.iRot = reader.Read<Vector3>();
spawn.iScale = reader.ReadSingle();
bool has_bound = Convert.ToBoolean(spawn.flags & (uint)ModelFlags.HasBound);
if (has_bound) // only WMOs have bound in MPQ, only available after computation
{
Vector3 bLow = reader.ReadStruct<Vector3>();
Vector3 bHigh = reader.ReadStruct<Vector3>();
Vector3 bLow = reader.Read<Vector3>();
Vector3 bHigh = reader.Read<Vector3>();
spawn.iBound = new AxisAlignedBox(bLow, bHigh);
}
uint nameLen = reader.ReadUInt32();
+2 -2
View File
@@ -139,7 +139,7 @@ namespace Game.Collision
liquid.iTilesX = reader.ReadUInt32();
liquid.iTilesY = reader.ReadUInt32();
liquid.iCorner = reader.ReadStruct<Vector3>();
liquid.iCorner = reader.Read<Vector3>();
liquid.iType = reader.ReadUInt32();
uint size = (liquid.iTilesX + 1) * (liquid.iTilesY + 1);
@@ -222,7 +222,7 @@ namespace Game.Collision
return false;
for (var i = 0; i < count; ++i)
vertices.Add(reader.ReadStruct<Vector3>());
vertices.Add(reader.Read<Vector3>());
// read triangle mesh
if (reader.ReadStringFromChars(4) != "TRIM")