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).

This commit is contained in:
nashmuhandes 2022-07-01 14:34:55 +08:00
parent 71c6552258
commit e2ff176e3a

View file

@ -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"))
{