Ninjas teleporter: Checks Z levels and distance.

Ninjas are able to use a camera console and teleport across the map.  This resolves that.
This commit is contained in:
ccomp5950
2015-12-09 17:17:33 -05:00
committed by GinjaNinja32
parent eaab614221
commit f0b6a933aa

View File

@@ -121,6 +121,11 @@
if(T.contains_dense_objects())
H << "<span class='warning'>You cannot teleport to a location with solid objects.</span>"
return 0
if(T.z != H.z || get_dist(T, get_turf(H)) > world.view)
H << "<span class='warning'>You cannot teleport to such a distant object.</span>"
return 0
phase_out(H,get_turf(H))
H.forceMove(T)