Kaynağa Gözat

fix lightning at transition from night to day

Kolja Strohm 10 ay önce
ebeveyn
işleme
11583605af
1 değiştirilmiş dosya ile 3 ekleme ve 1 silme
  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