loop edge mode from my mod (also works with stickmen)