fixed a bug where player input can be ignored when framerate is significantly faster than update rate, which causes gameupdate to be called less often

This commit is contained in:
minjaesong
2021-08-26 17:27:52 +09:00
parent 2099213e18
commit e5c25c5a10
3 changed files with 64 additions and 49 deletions

View File

@@ -516,6 +516,10 @@ open class TerrarumIngame(batch: SpriteBatch) : IngameInstance(batch) {
gameFullyLoaded = true
}
ingameController.update()
// define custom update rate
val updateRate = if (KeyToggler.isOn(Input.Keys.APOSTROPHE)) 1f / 8f else AppLoader.UPDATE_RATE
@@ -554,7 +558,7 @@ open class TerrarumIngame(batch: SpriteBatch) : IngameInstance(batch) {
// synchronised Ingame Input Updater
// will also queue up the block/wall/wire placed events
ingameController.update(delta)
ingameController.update()
if (!paused) {