4.7.17-patch1

Resolved ANRs due to A. Multiplayer checker not cancelling in loop and B. trying to update resources while checking tile improvement stat differences
This commit is contained in:
Yair Morgenstern 2023-08-24 10:46:20 +03:00
parent 978cb301f1
commit 5bcfcb3e8c
4 changed files with 7 additions and 5 deletions

View File

@ -4,8 +4,8 @@ package com.unciv.build
object BuildConfig { object BuildConfig {
const val kotlinVersion = "1.8.21" const val kotlinVersion = "1.8.21"
const val appName = "Unciv" const val appName = "Unciv"
const val appCodeNumber = 904 const val appCodeNumber = 905
const val appVersion = "4.7.17" const val appVersion = "4.7.17-patch1"
const val gdxVersion = "1.11.0" const val gdxVersion = "1.11.0"
const val ktorVersion = "2.2.3" const val ktorVersion = "2.2.3"

View File

@ -536,7 +536,7 @@ open class UncivGame(val isConsoleMode: Boolean = false) : Game(), PlatformSpeci
companion object { companion object {
//region AUTOMATICALLY GENERATED VERSION DATA - DO NOT CHANGE THIS REGION, INCLUDING THIS COMMENT //region AUTOMATICALLY GENERATED VERSION DATA - DO NOT CHANGE THIS REGION, INCLUDING THIS COMMENT
val VERSION = Version("4.7.17", 904) val VERSION = Version("4.7.17-patch1", 905)
//endregion //endregion
lateinit var Current: UncivGame lateinit var Current: UncivGame

View File

@ -208,7 +208,7 @@ class TileInfoImprovementFunctions(val tile: Tile) {
val city = tile.owningCity val city = tile.owningCity
if (city != null) { if (city != null) {
city.cityStats.update() city.cityStats.update()
city.civ.cache.updateCivResources() if (civToActivateBroaderEffects!=null) city.civ.cache.updateCivResources()
city.reassignPopulationDeferred() city.reassignPopulationDeferred()
} }
} }

View File

@ -21,9 +21,11 @@ import com.unciv.utils.withGLContext
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Job import kotlinx.coroutines.Job
import kotlinx.coroutines.coroutineScope import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.currentCoroutineContext
import kotlinx.coroutines.delay import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.flow import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.isActive
import java.time.Duration import java.time.Duration
import java.time.Instant import java.time.Instant
import java.util.Collections import java.util.Collections
@ -63,7 +65,7 @@ class OnlineMultiplayer {
multiplayerGameUpdater = flow<Unit> { multiplayerGameUpdater = flow<Unit> {
while (true) { while (true) {
delay(500) delay(500)
if (!currentCoroutineContext().isActive) return@flow
val currentGame = getCurrentGame() val currentGame = getCurrentGame()
val multiplayerSettings = UncivGame.Current.settings.multiplayer val multiplayerSettings = UncivGame.Current.settings.multiplayer
val preview = currentGame?.preview val preview = currentGame?.preview