some hacks to get some tier 11's compiling

This commit is contained in:
tresabhi committed 2026-11-04 16:04:02 -06:00
1 parent a2b97380ac
commit ebedac0642
1 file changed
+17 -17
@@ -79,14 +79,8 @@ export abstract class ServerBlitzKitAPI3 extends ServerBlitzKitAPI2 {
I_HAT, I_HAT,
-MathUtils.degToRad(turretRotation.pitch), -MathUtils.degToRad(turretRotation.pitch),
) )
.applyAxisAngle( .applyAxisAngle(J_HAT, -MathUtils.degToRad(turretRotation.roll))
J_HAT, .applyAxisAngle(K_HAT, -MathUtils.degToRad(turretRotation.yaw));
-MathUtils.degToRad(turretRotation.roll),
)
.applyAxisAngle(
K_HAT,
-MathUtils.degToRad(turretRotation.yaw),
);
} }
const coordinates = position.toArray(); const coordinates = position.toArray();
@@ -298,23 +292,29 @@ export abstract class ServerBlitzKitAPI3 extends ServerBlitzKitAPI2 {
turret.userString; turret.userString;
const turretCollisionName = parsePath( let turretCollisionName = parsePath(
turret.hitTester.collisionModel, turret.hitTester.collisionModel,
).name.toLowerCase(); ).name.toLowerCase();
const isFullYaw = -turretYaw[0] + turretYaw[1] === 360; const isFullYaw = -turretYaw[0] + turretYaw[1] === 360;
if (!collisionBoundingBoxes[turretCollisionName] && isFullYaw) { if (!collisionBoundingBoxes[turretCollisionName] && isFullYaw) {
throw new Error( turretCollisionName = "turret_01";
`Missing turret collision mesh for ${nation}-${tankKey} ${turretKey}`,
console.warn(
`HACK: Missing turret collision mesh for ${nation}/${tankKey}; turret key: ${
turretKey
}; collision model: ${turretCollisionName}; available options: ${Object.keys(
collisionBoundingBoxes,
).join(", ")}; using ${turretCollisionName} instead`,
); );
} }
const turretBoundingBox = collisionBoundingBoxes[ let turretBoundingBox = collisionBoundingBoxes[turretCollisionName];
turretCollisionName
] ?? { if (turretBoundingBox === undefined) {
min: [0, 0, 0] as Vector3Tuple, console.warn("HACK: missing collision; using 0's");
max: [0, 0, 0] as Vector3Tuple, turretBoundingBox = { min: [0, 0, 0], max: [0, 0, 0] };
}; }
modelDefinitions.models[tankId].turrets[turretId] = { modelDefinitions.models[tankId].turrets[turretId] = {
armor: turretArmor, armor: turretArmor,