From 80b02f7eab2ce4cd52dac098e1ef683526be3c0f Mon Sep 17 00:00:00 2001 From: Tanasart <22589759+Ttanasart-pt@users.noreply.github.com> Date: Wed, 9 Aug 2023 11:52:15 +0200 Subject: [PATCH] Sprite sheet: ceil sync frame. --- scripts/node_image_splice_sheet/node_image_splice_sheet.gml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/node_image_splice_sheet/node_image_splice_sheet.gml b/scripts/node_image_splice_sheet/node_image_splice_sheet.gml index a69aafdb8..1917c0e69 100644 --- a/scripts/node_image_splice_sheet/node_image_splice_sheet.gml +++ b/scripts/node_image_splice_sheet/node_image_splice_sheet.gml @@ -59,7 +59,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru .setDisplay(VALUE_DISPLAY.button, [ function() { var _atl = outputs[| 1].getValue(); var _spd = inputs[| 8].getValue(); - PROJECT.animator.frames_total = max(1, _spd == 0? 1 : array_length(_atl) / _spd); + PROJECT.animator.frames_total = max(1, _spd == 0? 1 : ceil(array_length(_atl) / _spd)); }, "Sync frames"] ); inputs[| 12] = nodeValue("Filter empty output", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);