Fixed looping animations for actors

This commit is contained in:
n00b
2024-11-15 22:19:40 -05:00
parent 378c25ffde
commit c085150def
9 changed files with 1448 additions and 1047 deletions

View File

@@ -307,6 +307,9 @@ int rc_createAnimatedActor(int mesh_id)
animation.frame_start_time = SDL_GetTicks();
animation.frame_swap_time = 1000/60;
rc_actor[actor_id].animation.push_back(animation);
rc_actor[actor_id].current_animation = 0;
rc_actor[actor_id].current_animation_loop = 0;
rc_actor[actor_id].num_animation_loops = 0;
rc_animEndCallBack* anim_callback = new rc_animEndCallBack();
anim_callback->ref_actor = &rc_actor[actor_id];
anim_callback->OnAnimationEnd(node);