diff --git a/src/lib/wmo/group.js b/src/lib/wmo/group.js index 077c8c0..750013c 100644 --- a/src/lib/wmo/group.js +++ b/src/lib/wmo/group.js @@ -13,13 +13,24 @@ const MOGP = Chunk({ minBoundingBox: Vec3Float, maxBoundingBox: Vec3Float, portalOffset: r.uint16le, - aBatchCount: r.uint16le, - interiorBatchCount: r.uint16le, - exteriorBatchCount: r.uint16le, + portalCount: r.uint16le, + batchCounts: new r.Struct({ + a: r.uint16le, + b: r.uint16le, + c: r.int32le + }), fogOffsets: new r.Array(r.uint8, 4), unknown: new r.Reserved(r.uint32le), groupID: r.uint32le, - unknowns: new r.Reserved(r.uint32le, 3) + unknowns: new r.Reserved(r.uint32le, 2), + + batchOffsets: function() { + return { + a: 0, + b: this.batchCounts.a, + c: this.batchCounts.a + this.batchCounts.b + }; + }, }); const MOPY = Chunk({ @@ -99,7 +110,7 @@ export default Chunked({ return this.flags & 0x4; }), - indoor: function() { + interior: function() { return (this.flags & 0x2000) !== 0 && (this.flags & 0x8) === 0; } }); diff --git a/src/lib/wmo/index.js b/src/lib/wmo/index.js index 8754d96..0854acf 100644 --- a/src/lib/wmo/index.js +++ b/src/lib/wmo/index.js @@ -15,7 +15,7 @@ const MOHD = Chunk({ modelCount: r.uint32le, doodadCount: r.uint32le, doodadSetCount: r.uint32le, - baseColor: new r.Struct({ + ambientColor: new r.Struct({ r: r.uint8, g: r.uint8, b: r.uint8,