Don't redestroy a tesla ball on stop orbit (#22482)

Destroy can cause the parent ball you're orbiting to also be destroyed,
which calls stop orbit on your ball, which then caused you to get
destroyed again, this fixes that while still guarding against the case
the original !loc qdel code was added for - see pr #15486
This commit is contained in:
oranges
2016-12-27 16:16:59 -05:00
committed by KorPhaeron
parent 6c16b1f334
commit fd7e8eb3bd
+1 -1
View File
@@ -145,7 +145,7 @@ var/list/blacklisted_tesla_types = typecacheof(list(/obj/machinery/atmospherics,
orbitingball.orbiting_balls -= src
orbitingball.dissipate_strength = orbitingball.orbiting_balls.len
..()
if (!loc)
if (!loc && !qdeleted(src))
qdel(src)