(hopefully) fixes a runtime causing the server to shit itself and crash immediately

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3190 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
quartz235@gmail.com
2012-02-25 04:02:24 +00:00
parent 06b4c17d97
commit 0b8e1f62bb

View File

@@ -372,17 +372,18 @@
var/turf/target
playsound(src, 'hiss.ogg', 50, 0, 0)
for(var/atom/movable/AM in H)
target = get_offset_target_turf(src.loc, rand(5)-rand(5), rand(5)-rand(5))
if(H) // Somehow, someone managed to flush a window which broke mid-transit and caused the disposal to go in an infinite loop trying to expel null, hopefully this fixes it
for(var/atom/movable/AM in H)
target = get_offset_target_turf(src.loc, rand(5)-rand(5), rand(5)-rand(5))
AM.loc = src.loc
AM.pipe_eject(0)
spawn(1)
if(AM)
AM.throw_at(target, 5, 1)
AM.loc = src.loc
AM.pipe_eject(0)
spawn(1)
if(AM)
AM.throw_at(target, 5, 1)
H.vent_gas(loc)
del(H)
H.vent_gas(loc)
del(H)
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if (istype(mover,/obj/item))
@@ -738,29 +739,31 @@
target = get_ranged_target_turf(T, direction, 10)
playsound(src, 'hiss.ogg', 50, 0, 0)
for(var/atom/movable/AM in H)
AM.loc = T
AM.pipe_eject(direction)
spawn(1)
if(AM)
AM.throw_at(target, 100, 1)
H.vent_gas(T)
del(H)
if(H)
for(var/atom/movable/AM in H)
AM.loc = T
AM.pipe_eject(direction)
spawn(1)
if(AM)
AM.throw_at(target, 100, 1)
H.vent_gas(T)
del(H)
else // no specified direction, so throw in random direction
playsound(src, 'hiss.ogg', 50, 0, 0)
for(var/atom/movable/AM in H)
target = get_offset_target_turf(T, rand(5)-rand(5), rand(5)-rand(5))
if(H)
for(var/atom/movable/AM in H)
target = get_offset_target_turf(T, rand(5)-rand(5), rand(5)-rand(5))
AM.loc = T
AM.pipe_eject(0)
spawn(1)
if(AM)
AM.throw_at(target, 5, 1)
AM.loc = T
AM.pipe_eject(0)
spawn(1)
if(AM)
AM.throw_at(target, 5, 1)
H.vent_gas(T) // all gas vent to turf
del(H)
H.vent_gas(T) // all gas vent to turf
del(H)
return
@@ -1174,14 +1177,14 @@
sleep(20) //wait until correct animation frame
playsound(src, 'hiss.ogg', 50, 0, 0)
for(var/atom/movable/AM in H)
AM.loc = src.loc
AM.pipe_eject(dir)
spawn(1)
AM.throw_at(target, 3, 1)
H.vent_gas(src.loc)
del(H)
if(H)
for(var/atom/movable/AM in H)
AM.loc = src.loc
AM.pipe_eject(dir)
spawn(1)
AM.throw_at(target, 3, 1)
H.vent_gas(src.loc)
del(H)
return