mirror of
https://github.com/ZDoom/ZDRay.git
synced 2024-11-22 20:11:11 +00:00
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:
parent
71c6552258
commit
e2ff176e3a
1 changed files with 2 additions and 5 deletions
|
@ -76,11 +76,8 @@ void FLevel::SetupLights()
|
||||||
|
|
||||||
if (!stricmp(key.key, "lm_suncolor"))
|
if (!stricmp(key.key, "lm_suncolor"))
|
||||||
{
|
{
|
||||||
FString hex = FString("0x") + FString(key.value);
|
lightcolor = atoi(key.value);
|
||||||
hex.StripChars("\"");
|
printf("Sun color: %d\n", lightcolor);
|
||||||
printf("Sun color: %s\n", hex.GetChars());
|
|
||||||
int rgb = hex.ToULong();
|
|
||||||
lightcolor = (uint32_t)rgb;
|
|
||||||
}
|
}
|
||||||
else if (!stricmp(key.key, "lm_sampledistance"))
|
else if (!stricmp(key.key, "lm_sampledistance"))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue