off by one error

This commit is contained in:
nek0 2018-07-30 14:34:26 +02:00
parent 33d808b240
commit 731e3d2744

View file

@ -428,7 +428,7 @@ updateMap dt = do
stat <- query anim stat <- query anim
let an = assetAnimations ud Map.! asId stat let an = assetAnimations ud Map.! asId stat
ntime = asElapsedTime stat + dt ntime = asElapsedTime stat + dt
nstate = if ntime > fromIntegral (asCurrentFrame stat) * nstate = if ntime > fromIntegral (asCurrentFrame stat + 1) *
(animDuration an / fromIntegral (length $ animSprites an)) (animDuration an / fromIntegral (length $ animSprites an))
then then
let nframe = asCurrentFrame stat + 1 let nframe = asCurrentFrame stat + 1