Solves excessive runtime production from beams being created improperly. (#10473)

This commit is contained in:
mikomyazaki
2020-11-06 03:18:30 +02:00
committed by GitHub
parent 5aae06cec0
commit 600a9a714c
2 changed files with 4 additions and 5 deletions
+1 -2
View File
@@ -23,9 +23,8 @@
target = beam_target
target_oldloc = get_turf(target)
if(get_dist(origin_oldloc, target_oldloc) >= max_distance || origin_oldloc.z != target_oldloc.z)
if(!origin || !target || !target_oldloc || !origin_oldloc || get_dist(origin_oldloc, target_oldloc) >= max_distance || origin_oldloc.z != target_oldloc.z)
qdel(src)
crash_with("Tried to create a new beam with length beyond its maximum distance limit.")
return
sleep_time = beam_sleep_time