From 30fa4e6e1af5b5f9e3cb29d97e35b5a22eab15be Mon Sep 17 00:00:00 2001 From: Jennifer Taylor Date: Mon, 20 Sep 2021 05:04:52 +0000 Subject: [PATCH] Make child clips loop indefinitely, as it seems that newer games expect this. --- bemani/format/afp/render.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bemani/format/afp/render.py b/bemani/format/afp/render.py index faff622..5f21cf1 100644 --- a/bemani/format/afp/render.py +++ b/bemani/format/afp/render.py @@ -1428,11 +1428,15 @@ class AFPRenderer(VerboseOutput): # Make sure to set the requested frame if it isn't set by an external force. if clip.requested_frame is None: - if not clip.playing or clip.finished or only_dirty: + if not clip.playing or only_dirty or (clip.finished and clip is self.__root): # We aren't playing this clip because its either paused or finished, # or it isn't dirty and we're doing dirty updates only. So, we don't # need to advance to any frame. clip.requested_frame = clip.frame + elif clip.finished: + # Rewind the clip to the beginning, loop it. + clip.rewind() + clip.requested_frame = clip.frame + 1 else: # We need to do as many things as we need to get to the next frame. clip.requested_frame = clip.frame + 1