Hotfixes the infinite reach (#17166)

This commit is contained in:
Selis
2025-02-16 17:29:30 +01:00
committed by GitHub
parent c5d7ee2191
commit c7703de699
@@ -717,13 +717,13 @@
while (cur_atom && !(cur_atom in container.contents))
if (isarea(cur_atom))
return -1
return INFINITY
if (istype(cur_atom.loc, /obj/item/storage))
depth++
cur_atom = cur_atom.loc
if (!cur_atom)
return -1 //inside something with a null loc.
return INFINITY //inside something with a null loc.
return depth
@@ -735,13 +735,13 @@
while (cur_atom && !isturf(cur_atom))
if (isarea(cur_atom))
return -1
return INFINITY
if (istype(cur_atom.loc, /obj/item/storage))
depth++
cur_atom = cur_atom.loc
if (!cur_atom)
return -1 //inside something with a null loc.
return INFINITY //inside something with a null loc.
return depth