From 4ddb157a639f4c18d537c4040c73726bb81bdb82 Mon Sep 17 00:00:00 2001 From: LJW-Dev <48092720+LJW-Dev@users.noreply.github.com> Date: Sun, 22 Mar 2026 16:39:06 +0800 Subject: [PATCH] fix: gfx linker was not drawing the last surface in the surface array --- .../Game/T6/BSP/Linker/GfxWorldLinker.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ObjLoading/Game/T6/BSP/Linker/GfxWorldLinker.cpp b/src/ObjLoading/Game/T6/BSP/Linker/GfxWorldLinker.cpp index c2a6710c..60c77518 100644 --- a/src/ObjLoading/Game/T6/BSP/Linker/GfxWorldLinker.cpp +++ b/src/ObjLoading/Game/T6/BSP/Linker/GfxWorldLinker.cpp @@ -123,13 +123,13 @@ namespace BSP // set all surface types to lit opaque gfxWorld->dpvs.litSurfsBegin = 0; - gfxWorld->dpvs.litSurfsEnd = static_cast(surfaceCount - 1); - gfxWorld->dpvs.emissiveOpaqueSurfsBegin = static_cast(surfaceCount - 1); - gfxWorld->dpvs.emissiveOpaqueSurfsEnd = static_cast(surfaceCount - 1); - gfxWorld->dpvs.emissiveTransSurfsBegin = static_cast(surfaceCount - 1); - gfxWorld->dpvs.emissiveTransSurfsEnd = static_cast(surfaceCount - 1); - gfxWorld->dpvs.litTransSurfsBegin = static_cast(surfaceCount - 1); - gfxWorld->dpvs.litTransSurfsEnd = static_cast(surfaceCount - 1); + gfxWorld->dpvs.litSurfsEnd = static_cast(surfaceCount); + gfxWorld->dpvs.emissiveOpaqueSurfsBegin = static_cast(surfaceCount); + gfxWorld->dpvs.emissiveOpaqueSurfsEnd = static_cast(surfaceCount); + gfxWorld->dpvs.emissiveTransSurfsBegin = static_cast(surfaceCount); + gfxWorld->dpvs.emissiveTransSurfsEnd = static_cast(surfaceCount); + gfxWorld->dpvs.litTransSurfsBegin = static_cast(surfaceCount); + gfxWorld->dpvs.litTransSurfsEnd = static_cast(surfaceCount); // visdata is written to by the game // all visdata is alligned by 128