fixes hitscan projectiles runtiming when reaching the edge of the map (#25853)

This commit is contained in:
chuga-git
2024-06-12 19:15:09 +00:00
committed by GitHub
parent 438faac253
commit f4b707bdd7
@@ -359,6 +359,8 @@
trajectory.increment(trajectory_multiplier)
var/turf/T = trajectory.return_turf()
if(!istype(T))
// if we've gone off of the map, we need to step back once so that hitscanning projectiles have a valid end turf
trajectory.increment(-trajectory_multiplier)
qdel(src)
return
if(T.z != loc.z)