mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-18 06:24:06 +09:00
changing the way weatherbox gets updated
This commit is contained in:
@@ -139,7 +139,7 @@ internal object WeatherMixer : RNGConsumer {
|
||||
weatherbox.windDir.p1 = it[2]
|
||||
weatherbox.windDir.p2 = it[3]
|
||||
weatherbox.windDir.p3 = it[4]
|
||||
weatherbox.windDir.p4 = it[5]
|
||||
// weatherbox.windDir.p4 = it[5]
|
||||
}
|
||||
(0..5).map { takeUniformRand(-1f..1f) }.let {
|
||||
weatherbox.windSpeed.pM1 = currentWeather.getRandomWindSpeed(it[0])
|
||||
@@ -147,7 +147,7 @@ internal object WeatherMixer : RNGConsumer {
|
||||
weatherbox.windSpeed.p1 = currentWeather.getRandomWindSpeed(it[2])
|
||||
weatherbox.windSpeed.p2 = currentWeather.getRandomWindSpeed(it[3])
|
||||
weatherbox.windSpeed.p3 = currentWeather.getRandomWindSpeed(it[4])
|
||||
weatherbox.windSpeed.p4 = currentWeather.getRandomWindSpeed(it[5])
|
||||
// weatherbox.windSpeed.p4 = currentWeather.getRandomWindSpeed(it[5])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,9 +17,10 @@ data class WeatherStateBox(
|
||||
var p1: Float = 0f,
|
||||
var p2: Float = 0f,
|
||||
var p3: Float = 0f,
|
||||
var p4: Float = 0f,
|
||||
var p5: Float = 0f,
|
||||
// var p4: Float = 0f,
|
||||
// var p5: Float = 0f,
|
||||
// pM1 and p4 only exists for the sake of better weather forecasting
|
||||
// - removing p4 and beyond: for faster response to the changing weather schedule and make the forecasting less accurate like irl
|
||||
) {
|
||||
|
||||
fun get() = interpolate(x, p0, p1, p2, p3)
|
||||
@@ -35,9 +36,12 @@ data class WeatherStateBox(
|
||||
p0 = p1
|
||||
p1 = p2
|
||||
p2 = p3
|
||||
p3 = p4
|
||||
p4 = p5
|
||||
p5 = next()
|
||||
p3 = next()
|
||||
|
||||
|
||||
// p3 = p4
|
||||
// p4 = p5
|
||||
// p5 = next()
|
||||
}
|
||||
return y
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user