mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-13 17:28:57 +07:00
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:
@ -4,8 +4,8 @@ package com.unciv.build
|
||||
object BuildConfig {
|
||||
const val kotlinVersion = "1.8.21"
|
||||
const val appName = "Unciv"
|
||||
const val appCodeNumber = 904
|
||||
const val appVersion = "4.7.17"
|
||||
const val appCodeNumber = 905
|
||||
const val appVersion = "4.7.17-patch1"
|
||||
|
||||
const val gdxVersion = "1.11.0"
|
||||
const val ktorVersion = "2.2.3"
|
||||
|
@ -536,7 +536,7 @@ open class UncivGame(val isConsoleMode: Boolean = false) : Game(), PlatformSpeci
|
||||
|
||||
companion object {
|
||||
//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
|
||||
|
||||
lateinit var Current: UncivGame
|
||||
|
@ -208,7 +208,7 @@ class TileInfoImprovementFunctions(val tile: Tile) {
|
||||
val city = tile.owningCity
|
||||
if (city != null) {
|
||||
city.cityStats.update()
|
||||
city.civ.cache.updateCivResources()
|
||||
if (civToActivateBroaderEffects!=null) city.civ.cache.updateCivResources()
|
||||
city.reassignPopulationDeferred()
|
||||
}
|
||||
}
|
||||
|
@ -21,9 +21,11 @@ import com.unciv.utils.withGLContext
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.coroutineScope
|
||||
import kotlinx.coroutines.currentCoroutineContext
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.flow.flow
|
||||
import kotlinx.coroutines.flow.launchIn
|
||||
import kotlinx.coroutines.isActive
|
||||
import java.time.Duration
|
||||
import java.time.Instant
|
||||
import java.util.Collections
|
||||
@ -63,7 +65,7 @@ class OnlineMultiplayer {
|
||||
multiplayerGameUpdater = flow<Unit> {
|
||||
while (true) {
|
||||
delay(500)
|
||||
|
||||
if (!currentCoroutineContext().isActive) return@flow
|
||||
val currentGame = getCurrentGame()
|
||||
val multiplayerSettings = UncivGame.Current.settings.multiplayer
|
||||
val preview = currentGame?.preview
|
||||
|
Reference in New Issue
Block a user