Remove player on finish level

main
En Yi 2024-08-27 15:49:21 +08:00
parent d3ea551024
commit e00e1ff8d2
1 changed files with 3 additions and 0 deletions

View File

@ -144,6 +144,9 @@ static unsigned int player_finish_transition_func(Entity_t* ent)
if (p_spr->current_frame == p_spr->sprites[p_spr->current_idx].sprite->frame_count - 1) if (p_spr->current_frame == p_spr->sprites[p_spr->current_idx].sprite->frame_count - 1)
{ {
p_spr->pause = true; p_spr->pause = true;
// This entity has no special init, so it's fine to remove
// at end of animation
remove_entity(ent->manager, ent->m_id);
} }
return p_spr->current_idx; return p_spr->current_idx;
} }