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.
This commit is contained in:
@@ -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<float>(M_PI) / 12000.f);
|
||||
const auto ProportionOfDay = a_Chunk.GetWorld()->GetTimeOfDay().count() * (static_cast<float>(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);
|
||||
|
||||
Reference in New Issue
Block a user