From 731e3d2744110c1605e078e5c211f0d1d040a14b Mon Sep 17 00:00:00 2001 From: nek0 Date: Mon, 30 Jul 2018 14:34:26 +0200 Subject: [PATCH] off by one error --- src/MainGame/WorldMap.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MainGame/WorldMap.hs b/src/MainGame/WorldMap.hs index 9dd611e..0905560 100644 --- a/src/MainGame/WorldMap.hs +++ b/src/MainGame/WorldMap.hs @@ -428,7 +428,7 @@ updateMap dt = do stat <- query anim let an = assetAnimations ud Map.! asId stat ntime = asElapsedTime stat + dt - nstate = if ntime > fromIntegral (asCurrentFrame stat) * + nstate = if ntime > fromIntegral (asCurrentFrame stat + 1) * (animDuration an / fromIntegral (length $ animSprites an)) then let nframe = asCurrentFrame stat + 1