From 4cd49d7eca5f8fd53eb98577a1f218a5086704bb Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Mon, 5 Apr 2021 01:38:43 +0100 Subject: Fix sending incorrect date values on world change Yak shave: make more things use cTickTime. Fix a couple of incorrect modulo-on-millisecond-value by making them use WorldTickAge. --- src/Simulator/IncrementalRedstoneSimulator/DaylightSensorHandler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Simulator/IncrementalRedstoneSimulator/DaylightSensorHandler.h') diff --git a/src/Simulator/IncrementalRedstoneSimulator/DaylightSensorHandler.h b/src/Simulator/IncrementalRedstoneSimulator/DaylightSensorHandler.h index 51a5fcb3b..75e6651da 100644 --- a/src/Simulator/IncrementalRedstoneSimulator/DaylightSensorHandler.h +++ b/src/Simulator/IncrementalRedstoneSimulator/DaylightSensorHandler.h @@ -18,7 +18,7 @@ namespace DaylightSensorHandler } // The [0, 1) proportion of the current day that has elapsed. - const auto ProportionOfDay = a_Chunk.GetWorld()->GetTimeOfDay() * (static_cast(M_PI) / 12000.f); + const auto ProportionOfDay = a_Chunk.GetWorld()->GetTimeOfDay().count() * (static_cast(M_PI) / 12000.f); // The curved value of darkened skylight, with outputs somewhat similar to Vanilla. const auto RawOutput = a_Chunk.GetSkyLightAltered(a_Position) * (0.6f * std::sin(ProportionOfDay) + 0.5f); -- cgit v1.2.3