Fix moon being enabled throught the day
This commit is contained in:
@@ -352,11 +352,11 @@ void ATimeOfDayManager::SetDirectionalLightIntensity(const float &_rotator)
|
|||||||
: CurrentGiIntensity;
|
: CurrentGiIntensity;
|
||||||
MainPP->Settings = Settings;
|
MainPP->Settings = Settings;
|
||||||
|
|
||||||
bool bSunEnabled = CurrentSunlightIntensity > 0.0f;
|
bool bSunEnabled = CurrentSunlightIntensity > 0.001f;
|
||||||
sunLight->SetVisibility(bSunEnabled);
|
sunLight->SetVisibility(bSunEnabled);
|
||||||
sunLight->SetCastShadows(bSunEnabled);
|
sunLight->SetCastShadows(bSunEnabled);
|
||||||
|
|
||||||
bool bMoonEnabled = CurrentMoonlightIntensity > 0.0f;
|
bool bMoonEnabled = CurrentMoonlightIntensity > 0.001f;
|
||||||
moonLight->SetVisibility(bMoonEnabled);
|
moonLight->SetVisibility(bMoonEnabled);
|
||||||
moonLight->SetCastShadows(bMoonEnabled);
|
moonLight->SetCastShadows(bMoonEnabled);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user