From 88e4d2c36a5910aa8b59cdc47558cb2618622ab3 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Mon, 29 Jul 2019 08:57:04 +0200 Subject: [PATCH] fix: make sure that pauseAtEnd works as intended --- sonic-radiance.love/core/modules/assets/animator.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sonic-radiance.love/core/modules/assets/animator.lua b/sonic-radiance.love/core/modules/assets/animator.lua index d788949..53da4e4 100644 --- a/sonic-radiance.love/core/modules/assets/animator.lua +++ b/sonic-radiance.love/core/modules/assets/animator.lua @@ -60,7 +60,9 @@ function Animator:update(dt) if self.frameTimer > 1 then self.frameTimer = 0 if self.frame == self.animationData.endAt then - self.frame = self.animationData.loop + if not (self.animationData.pauseAtEnd) then + self.frame = self.animationData.loop + end else self.frame = self.frame + 1 end