add the following to ~line 1548 after if block “if setup.sortSprite ~= nil then…”: :
if setup.sortSpriteOnce ~= nil then objects[sprite].sortSpriteOnce = setup.sortSpriteOnce objects[sprite].spriteSorted = false; else objects[sprite].sortSpriteOnce = false end
add the following to ~line 1762 after if block “if setup.sortSprite ~= nil then…”:
if setup.sortSpriteOnce ~= nil then objects[sprite].sortSpriteOnce = setup.sortSpriteOnce objects[sprite].spriteSorted = false; else objects[sprite].sortSpriteOnce = false end
wrap the sprite sorting code at ~ line 11760 with:
if object.sortSprite then if object.sortSpriteOnce and object.spriteSorted then -- do nothing else --do the old sprite sorting code end end