weather only change on titlescreen

This commit is contained in:
minjaesong
2023-06-30 00:53:46 +09:00
parent 6db3baf691
commit e5e02681b8
4 changed files with 23 additions and 5 deletions

View File

@@ -57,6 +57,18 @@ internal object WeatherMixer : RNGConsumer {
// TODO to save from GL overhead, store lightmap to array; use GdxColorMap
var forceTimeAt: Int? = null
override fun loadFromSave(s0: Long, s1: Long) {
super.loadFromSave(s0, s1)
internalReset()
}
fun internalReset() {
globalLightOverridden = false
forceTimeAt = null
}
init {
weatherList = HashMap<String, ArrayList<BaseModularWeather>>()
@@ -146,7 +158,7 @@ internal object WeatherMixer : RNGConsumer {
// we will not care for nextSkybox for now
val timeNow = world.worldTime.TIME_T.toInt() % WorldTime.DAY_LENGTH
val timeNow = (forceTimeAt ?: world.worldTime.TIME_T.toInt()) % WorldTime.DAY_LENGTH
val skyboxColourMap = currentWeather.skyboxGradColourMap
// calculate global light