diff --git a/scripts/buildAssets.ts b/scripts/buildAssets.ts index 20655338a..7748f68e7 100644 --- a/scripts/buildAssets.ts +++ b/scripts/buildAssets.ts @@ -518,6 +518,8 @@ if (allTargets || targets?.includes('tankModels')) { // if (id !== 4417) continue; // amx m4 mle // if (id !== 7297) continue; // 60tp // if (id !== 1) continue; // t-34 + // if (id !== 6753) continue; // type 71 + // if (id !== 5137) continue; // tiger ii console.log(`Building model ${id} @ ${nation}/${tankIndex}`); diff --git a/src/core/blitz/extractModel.ts b/src/core/blitz/extractModel.ts index d3c394207..ab97729a6 100644 --- a/src/core/blitz/extractModel.ts +++ b/src/core/blitz/extractModel.ts @@ -141,9 +141,11 @@ export async function extractModel( components.forEach((component) => { switch (component['comp.typename']) { + case 'ScenarioComponent': case 'LodComponent': case 'DecorItemComponent': case 'NewSlotComponent': + case 'StateSwitcherComponent': case 'SlotComponent': break; diff --git a/src/core/blitzkrieg/readTexture.ts b/src/core/blitzkrieg/readTexture.ts index 4d025f082..ce12e48da 100644 --- a/src/core/blitzkrieg/readTexture.ts +++ b/src/core/blitzkrieg/readTexture.ts @@ -74,9 +74,9 @@ export async function readTexture(path: string, options?: ReadTextureOptions) { const b = dds.data[index + 2] / 255; const a = dds.data[index + 3] / 255; const invA = 1 - a; - const rPrime = invA * options.baseColor[0] + r; - const gPrime = invA * options.baseColor[1] + g; - const bPrime = invA * options.baseColor[2] + b; + const rPrime = r + invA * options.baseColor[0]; + const gPrime = g + invA * options.baseColor[1]; + const bPrime = b + invA * options.baseColor[2]; dds.data[index] = Math.round(clamp(rPrime * 255, 0, 255)); dds.data[index + 1] = Math.round(clamp(gPrime * 255, 0, 255)); diff --git a/src/core/streams/sc2.ts b/src/core/streams/sc2.ts index 51bc50ae1..65442722e 100644 --- a/src/core/streams/sc2.ts +++ b/src/core/streams/sc2.ts @@ -168,7 +168,16 @@ export type Component = }; }; }; - }; + } + | { + 'comp.typename': 'ScenarioComponent'; + 'scenario.scriptId': string; + } + | ({ + 'comp.typename': 'StateSwitcherComponent'; + 'ssc.activeState': number; + 'ssc.statesCount': number; + } & Record<`ssc.state${number}`, string>); interface SceneComponents { count: number;