- PA particles and projectiles will now be garbage collected. I have tested it to make sure that they are no longer in memory.

- You should no longer open doors when being pushed back in a pod/shuttle.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5750 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
giacomand@gmail.com
2013-02-20 23:29:07 +00:00
parent 6b03a2ebbb
commit 504342b4a7
4 changed files with 23 additions and 8 deletions
+6 -1
View File
@@ -442,4 +442,9 @@ datum/shuttle_controller
/proc/push_mob_back(var/mob/living/L, var/dir)
if(iscarbon(L))
if(prob(88))
step(L, dir)
var/turf/T = get_step(L, dir)
if(T)
for(var/obj/O in T) // For doors and such (kinda ugly but we can't have people opening doors)
if(!O.CanPass(L, L.loc, 1, 0))
return
step(L, dir)
@@ -22,9 +22,11 @@
movement_range = 20
energy = 50
/obj/effect/accelerated_particle/New(loc, dir = 2)
src.loc = loc
src.dir = dir
if(movement_range > 20)
movement_range = 20
spawn(0)
@@ -48,7 +50,7 @@
/obj/effect/accelerated_particle/ex_act(severity)
del(src)
loc = null
return
@@ -68,11 +70,13 @@
/obj/effect/accelerated_particle/proc/move(var/lag)
if(loc == null)
return
if(!step(src,dir))
src.loc = get_step(src,dir)
movement_range--
if(movement_range <= 0)
del(src)
loc = null
else
sleep(lag)
move(lag)
+10 -4
View File
@@ -50,6 +50,10 @@
var/drowsy = 0
proc/delete()
// Garbage collect the projectiles
loc = null
proc/on_hit(var/atom/target, var/blocked = 0)
if(blocked >= 2) return 0//Full block
if(!isliving(target)) return 0
@@ -109,7 +113,8 @@
density = 0
invisibility = 101
del(src)
delete()
return 0
return 1
@@ -124,13 +129,14 @@
process()
if(kill_count < 1)
del(src)
delete()
return
kill_count--
spawn while(src)
spawn while(src && src.loc)
if((!( current ) || loc == current))
current = locate(min(max(x + xo, 1), world.maxx), min(max(y + yo, 1), world.maxy), z)
if((x == 1 || x == world.maxx || y == 1 || y == world.maxy))
del(src)
delete()
return
step_towards(src, current)
sleep(1)
@@ -64,7 +64,7 @@
for(var/mob/M in range(10, src))
if(!M.stat && !istype(M, /mob/living/silicon/ai))\
shake_camera(M, 3, 1)
del(src)
delete()
return 1
else
return 0