Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 71ff460

Browse files
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
1 parent f3baf27 commit 71ff460

File tree

1 file changed

+5
-1
lines changed
  • code/modules/power/singularity/particle_accelerator

1 file changed

+5
-1
lines changed

code/modules/power/singularity/particle_accelerator/particle.dm

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@
6565
if(QDELETED(src))
6666
return
6767
if(!step(src,dir))
68-
forceMove(get_step(src,dir))
68+
var/next_step = get_step(src, dir)
69+
if(!next_step) // reached the edge of the map
70+
qdel(src)
71+
return
72+
forceMove(next_step)
6973
if(movement_range == 0)
7074
qdel(src)
7175
return

0 commit comments

Comments
 (0)