Strip quotes from the sun color string

This commit is contained in:
nashmuhandes 2022-06-15 19:24:43 +08:00
parent e0b8335937
commit 5124788013

View file

@ -118,9 +118,11 @@ void FLevel::SetupLights()
{
const UDMFKey &key = thing->props[propIndex];
if (!stricmp(key.key, "zdraysuncolor") && key.value)
if (!stricmp(key.key, "zdraysuncolor"))
{
FString hex = FString("0x") + FString(key.value);
hex.StripChars("\"");
printf("Sun color: %s\n", hex);
int rgb = hex.ToULong();
lightcolor = (uint32_t)rgb;
}