I didnt think of the reprocussions of new being called twice so particles were trying to move in two different directions.
This commit is contained in:
D3athrow
2015-02-08 01:23:18 -06:00
parent 39e1a39d0c
commit d3db5b7f72
3 changed files with 6 additions and 6 deletions

View File

@@ -25,7 +25,7 @@
proc/RadiateParticle(var/energy, var/ionizing, var/dir = 0) proc/RadiateParticle(var/energy, var/ionizing, var/dir = 0)
if(!dir) if(!dir)
RadiateParticleRand(energy, ionizing) RadiateParticleRand(energy, ionizing)
var/obj/effect/accelerated_particle/particle = new var/obj/effect/accelerated_particle/particle = getFromPool(/obj/effect/accelerated_particle,get_turf(src))
particle.dir = dir particle.dir = dir
particle.ionizing = ionizing particle.ionizing = ionizing
if(energy) if(energy)

View File

@@ -33,16 +33,16 @@
energy = 50 energy = 50
icon_state="particle3" icon_state="particle3"
/obj/effect/accelerated_particle/New(loc, dir = 2) /obj/effect/accelerated_particle/New(loc, dir = 2, move = 0)
. = ..() . = ..()
src.loc = loc src.loc = loc
src.dir = dir src.dir = dir
if(movement_range > 20) if(movement_range > 20)
movement_range = 20 movement_range = 20
if(move)
spawn(0) spawn(0)
move(1) move(1)
/obj/effect/accelerated_particle/Bump(atom/A) /obj/effect/accelerated_particle/Bump(atom/A)
if (A) if (A)

View File

@@ -47,6 +47,6 @@
A = getFromPool(/obj/effect/accelerated_particle/powerful,T) A = getFromPool(/obj/effect/accelerated_particle/powerful,T)
if(A) if(A)
A.dir = src.dir A.dir = src.dir
A.New(T,dir) A.New(T,dir,1)
return 1 return 1
return 0 return 0