writing savemode to the savegame binary

This commit is contained in:
minjaesong
2021-09-29 17:34:26 +09:00
parent 60a8382f93
commit 7ddde8e4f0
7 changed files with 24 additions and 9 deletions

View File

@@ -291,6 +291,8 @@ open class TerrarumIngame(batch: SpriteBatch) : IngameInstance(batch) {
// by doing this, whatever the "possession" the player had will be broken by the game load
actorNowPlaying = getActorByID(Terrarum.PLAYER_REF_ID) as IngamePlayer
makeSavegameBackupCopy() // don't put it on the postInit() or render(); postInitForNewGame calls this function on the savegamewriter's callback
}
private fun postInitForNewGame() {
@@ -314,7 +316,7 @@ open class TerrarumIngame(batch: SpriteBatch) : IngameInstance(batch) {
// make initial savefile
WriteSavegame.immediate(savegameArchive, getSaveFileMain(), this) {
makeSavegameBackupCopy()
makeSavegameBackupCopy() // don't put it on the postInit() or render(); must be called using callback
}
}