From 241f631d9d7971aad609b7f9bfccdc45938ff50e Mon Sep 17 00:00:00 2001 From: kichikuou Date: Sun, 30 Oct 2022 11:13:56 +0900 Subject: [PATCH] ReignEngine: Set loop frame range for particle effects Without this, update_motion cannot calculate current_frame correctly when the effect is used with RE_MOTION_STATE_LOOP state. --- src/3d/particle.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/3d/particle.c b/src/3d/particle.c index 9f39009..b9ac076 100644 --- a/src/3d/particle.c +++ b/src/3d/particle.c @@ -741,8 +741,8 @@ void particle_effect_calc_frame_range(struct particle_effect *effect, struct mot if (end_frame < obj_end) end_frame = obj_end; } - motion->frame_begin = begin_frame; - motion->frame_end = end_frame; + motion->frame_begin = motion->loop_frame_begin = begin_frame; + motion->frame_end = motion->loop_frame_end = end_frame; } static void update_camera_quake(struct RE_instance *inst, struct particle_object *po)