From e6e451c0400e69b7d573cb49872d9517c419efa1 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Sat, 9 Nov 2024 22:56:11 -0800 Subject: [PATCH] Source Engine: Fix disappearing overlays --- src/SourceEngine/BSPFile.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/SourceEngine/BSPFile.ts b/src/SourceEngine/BSPFile.ts index 2e8f1400b..0f72f8614 100644 --- a/src/SourceEngine/BSPFile.ts +++ b/src/SourceEngine/BSPFile.ts @@ -1820,6 +1820,9 @@ export class BSPFile { vec3.set(overlayInfo.basis[0], vecUVPoint0Z, vecUVPoint1Z, vecUVPoint2Z); vec3.cross(overlayInfo.basis[1], overlayInfo.normal, overlayInfo.basis[0]); + if (vecUVPoint3Z == 1.0) + vec3.negate(overlayInfo.basis[1], overlayInfo.basis[1]); + vec2.set(overlayInfo.planePoints[0], vecUVPoint0X, vecUVPoint0Y); vec2.set(overlayInfo.planePoints[1], vecUVPoint1X, vecUVPoint1Y); vec2.set(overlayInfo.planePoints[2], vecUVPoint2X, vecUVPoint2Y);