Fixes runtime error when particle accelerators hit the edge of a planetary map (#22968)

* that's a surprise tool that will help us later

* f
This commit is contained in:
SapphicOverload
2025-01-20 22:39:25 -05:00
committed by GitHub
parent f3baf27a94
commit 71ff4608ed

View File

@@ -65,7 +65,11 @@
if(QDELETED(src))
return
if(!step(src,dir))
forceMove(get_step(src,dir))
var/next_step = get_step(src, dir)
if(!next_step) // reached the edge of the map
qdel(src)
return
forceMove(next_step)
if(movement_range == 0)
qdel(src)
return