t2-demo-parser 3.0.1 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"DataBlockParsers.d.ts","sourceRoot":"","sources":["../src/DataBlockParsers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAuwExD,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI,CA0OtE"}
1
+ {"version":3,"file":"DataBlockParsers.d.ts","sourceRoot":"","sources":["../src/DataBlockParsers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AA0wExD,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI,CA0OtE"}
@@ -754,9 +754,12 @@ function projectileDataUnpack(bs) {
754
754
  decals.push(readDataBlockRef(bs));
755
755
  }
756
756
  result.decals = decals;
757
- // flag(hasLight); if true: readFloat(8) + 3×readFloat(7)
757
+ // flag(hasLight); if true: readFloat(8) × 20 + 3×readFloat(7).
758
+ // ProjectileData::unpackData (FUN_00631360) multiplies the 8-bit
759
+ // radius by 20.0 (packData writes lightRadius / 20; the field is
760
+ // clamped to [1, 20] in onAdd).
758
761
  if (bs.readFlag()) {
759
- result.lightRadius = bs.readFloat(8);
762
+ result.lightRadius = bs.readFloat(8) * 20;
760
763
  result.lightColor = {
761
764
  r: bs.readFloat(7),
762
765
  g: bs.readFloat(7),
@@ -1578,9 +1581,9 @@ function forceFieldBareDataUnpack(bs) {
1578
1581
  result.fadeMS = bs.readS32();
1579
1582
  result.baseTranslucency = bs.readF32();
1580
1583
  result.powerOffTranslucency = bs.readF32();
1581
- // 2 readFlag (offsets 0x8c, 0x8d 1-bit flags, inline bit extraction)
1582
- result.fadeInOnly = bs.readFlag();
1583
- result.triggerEnable = bs.readFlag();
1584
+ // initPersistFields (0x6751a0) names offsets 0x8c/0x8d; unpackData reads them in that order.
1585
+ result.teamPermiable = bs.readFlag();
1586
+ result.otherPermiable = bs.readFlag();
1584
1587
  // 2 ColorF via FUN_0043f040 (packed 4×U8 = 32 bits each, offsets 0x90, 0xa0)
1585
1588
  result.color1 = readColorF(bs);
1586
1589
  result.color2 = readColorF(bs);