diff --git a/data/actors.lua b/data/actors.lua index 02c8c45..dd8b43e 100644 --- a/data/actors.lua +++ b/data/actors.lua @@ -132,11 +132,13 @@ actors={ v.dy=v.dy+1 end end - if needs_sorting then - table.sort(actors.list, compare_actors) - end + if needs_sorting then actors.sort() end actors.updating=false + end, + + sort=function() + table.sort(actors.list, compare_actors) end } diff --git a/data/game.lua b/data/game.lua index a6737ff..fa8aa69 100644 --- a/data/game.lua +++ b/data/game.lua @@ -51,6 +51,7 @@ game={ else update=game.update end + actors.sort() fade.fadein() end,