mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
fix: savegame playtime was calculated wrongly
This commit is contained in:
@@ -439,7 +439,7 @@ open class IngameInstance(val batch: FlippingSpriteBatch, val isMultiplayer: Boo
|
||||
}
|
||||
|
||||
open fun saveTheGame(onSuccessful: () -> Unit, onError: (Throwable) -> Unit) {
|
||||
|
||||
loadedTime_t = App.getTIME_T()
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -495,6 +495,8 @@ open class TerrarumIngame(batch: FlippingSpriteBatch) : IngameInstance(batch) {
|
||||
|
||||
App.savegameWorlds[world.worldIndex] = SavegameCollection.collectFromBaseFilename(File(worldsDir), worldSavefileName)
|
||||
App.savegameWorldsName[world.worldIndex] = worldName
|
||||
|
||||
loadedTime_t = App.getTIME_T()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1184,6 +1186,8 @@ open class TerrarumIngame(batch: FlippingSpriteBatch) : IngameInstance(batch) {
|
||||
|
||||
// return to normal state
|
||||
onSuccessful()
|
||||
|
||||
loadedTime_t = App.getTIME_T()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1414,6 +1418,9 @@ open class TerrarumIngame(batch: FlippingSpriteBatch) : IngameInstance(batch) {
|
||||
val timeDiff = System.nanoTime() - start
|
||||
debugTimers.put("Last Autosave Duration", timeDiff)
|
||||
printdbg(this, "Last Autosave Duration: ${(timeDiff) / 1000000000} s")
|
||||
|
||||
|
||||
loadedTime_t = App.getTIME_T()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user