1
0
mirror of synced 2025-02-17 11:18:33 +01:00

Make child clips loop indefinitely, as it seems that newer games expect this.

This commit is contained in:
Jennifer Taylor 2021-09-20 05:04:52 +00:00
parent b151afef69
commit 30fa4e6e1a

View File

@ -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