From 6a37b28542079d4144a5ae711df90a0cffca1077 Mon Sep 17 00:00:00 2001 From: RDW Date: Wed, 31 Jan 2024 19:40:05 +0100 Subject: [PATCH] Client: Enable vertex fog for all relevant RSW scenes Kind of hacky, but once the resources API is streamlined it'll probably be easier to actually test that this works as intended... --- Core/FileFormats/RagnarokMap.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Core/FileFormats/RagnarokMap.lua b/Core/FileFormats/RagnarokMap.lua index f88ff465..dbaddbc8 100644 --- a/Core/FileFormats/RagnarokMap.lua +++ b/Core/FileFormats/RagnarokMap.lua @@ -3,6 +3,8 @@ local RagnarokGND = require("Core.FileFormats.RagnarokGND") local RagnarokGRF = require("Core.FileFormats.RagnarokGRF") local RagnarokRSW = require("Core.FileFormats.RagnarokRSW") +local C_Resources = require("Core.NativeClient.C_Resources") + local NormalsVisualization = require("Core.NativeClient.DebugDraw.NormalsVisualization") local uv = require("uv") @@ -64,6 +66,9 @@ function RagnarokMap:Construct(mapID, fileSystem) } scene.directionalLight = sun + -- Not really testable with how the resource management works currently; should improve later + scene.fogParameters = C_Resources.PERSISTENT_RESOURCES["data/fogparametertable.txt"][mapID] + printf("[RagnarokMap] Entering world %s (%s)", mapID, scene.displayName) return scene