From e2ff176e3a5cc9228b817b94d80f8e60cbee2fbd Mon Sep 17 00:00:00 2001 From: nashmuhandes Date: Fri, 1 Jul 2022 14:34:55 +0800 Subject: [PATCH] Use integer for the sun color. UDB's color picker actually stores the color as an int when you save the map (despite exposing it in the UI as XXRRGGBB). --- src/level/level_light.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/level/level_light.cpp b/src/level/level_light.cpp index ac1d18a..68f9f5a 100644 --- a/src/level/level_light.cpp +++ b/src/level/level_light.cpp @@ -76,11 +76,8 @@ void FLevel::SetupLights() if (!stricmp(key.key, "lm_suncolor")) { - FString hex = FString("0x") + FString(key.value); - hex.StripChars("\""); - printf("Sun color: %s\n", hex.GetChars()); - int rgb = hex.ToULong(); - lightcolor = (uint32_t)rgb; + lightcolor = atoi(key.value); + printf("Sun color: %d\n", lightcolor); } else if (!stricmp(key.key, "lm_sampledistance")) {