diff --git a/code/modules/orbit/orbit.dm b/code/modules/orbit/orbit.dm index 02a80675aa..913b552a55 100644 --- a/code/modules/orbit/orbit.dm +++ b/code/modules/orbit/orbit.dm @@ -33,7 +33,9 @@ orbiting = null return ..() -/datum/orbit/proc/Check(turf/targetloc) +/datum/orbit/proc/Check(turf/targetloc, list/checked_already = list()) + //Avoid infinite loops for people who end up orbiting themself through another orbiter + checked_already[src] = TRUE if (!orbiter) qdel(src) return @@ -55,9 +57,14 @@ lastloc = orbiter.loc for(var/other_orbit in orbiter.orbiters) var/datum/orbit/OO = other_orbit +<<<<<<< HEAD if(OO == src) +======= + //Skip if checked already + if(checked_already[OO]) +>>>>>>> 23d33a3... Merge pull request #33914 from optimumtact/thegreatestshow continue - OO.Check(targetloc) + OO.Check(targetloc, checked_already) /atom/movable/var/datum/orbit/orbiting = null /atom/var/list/orbiters = null