mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-28 20:55:44 +00:00
Use state loaded checks in raw rewind (#8195)
This commit is contained in:
@@ -2523,7 +2523,7 @@ class GamesManager(
|
||||
case Some(error) => Left(error)
|
||||
case None =>
|
||||
// If game is loaded, unload it only after the target is validated — rewind will invalidate in-memory state.
|
||||
if gameControllerInfos.contains(gameId) then {
|
||||
if state.hasControllerInfo(gameId) then {
|
||||
shardokClient.cancelBattlesForGame(gameId)
|
||||
unloadGame(gameId): Unit
|
||||
}
|
||||
@@ -2545,7 +2545,7 @@ class GamesManager(
|
||||
}
|
||||
|
||||
// If game is loaded, unload it — rewind will invalidate in-memory state
|
||||
if gameControllerInfos.contains(gameId) then {
|
||||
if state.hasControllerInfo(gameId) then {
|
||||
shardokClient.cancelBattlesForGame(gameId)
|
||||
unloadGame(gameId): Unit
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user