Skip to content

Commit

Permalink
Fixes runtime error when particle accelerators hit the edge of a plan…
Browse files Browse the repository at this point in the history
…etary map (#22968)

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

* f
  • Loading branch information
SapphicOverload authored Jan 21, 2025
1 parent f3baf27 commit 71ff460
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 71ff460

Please sign in to comment.