Procházet zdrojové kódy

fix lightning at transition from night to day

Kolja Strohm před 1 rokem
rodič
revize
11583605af
1 změnil soubory, kde provedl 3 přidání a 1 odebrání
  1. 3 1
      FactoryCraft/World.cpp

+ 3 - 1
FactoryCraft/World.cpp

@@ -280,7 +280,9 @@ void World::onTick(double time)
     else if (this->time > dayLength + transitionLength + nightLength)
     {
         dayLightFactor
-            = (float)((this->time - dayLength) / transitionLength) * 0.95f
+            = (float)((this->time - dayLength - nightLength - transitionLength)
+                      / transitionLength)
+                * 0.95f
             + 0.05f;
     }
     else