Explorar el Código

fix lightning at transition from night to day

Kolja Strohm hace 1 año
padre
commit
11583605af
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  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