mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Fixes #2875
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:
@@ -25,7 +25,7 @@
|
||||
proc/RadiateParticle(var/energy, var/ionizing, var/dir = 0)
|
||||
if(!dir)
|
||||
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.ionizing = ionizing
|
||||
if(energy)
|
||||
|
||||
@@ -33,16 +33,16 @@
|
||||
energy = 50
|
||||
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.dir = dir
|
||||
|
||||
if(movement_range > 20)
|
||||
movement_range = 20
|
||||
|
||||
spawn(0)
|
||||
move(1)
|
||||
if(move)
|
||||
spawn(0)
|
||||
move(1)
|
||||
|
||||
/obj/effect/accelerated_particle/Bump(atom/A)
|
||||
if (A)
|
||||
|
||||
@@ -47,6 +47,6 @@
|
||||
A = getFromPool(/obj/effect/accelerated_particle/powerful,T)
|
||||
if(A)
|
||||
A.dir = src.dir
|
||||
A.New(T,dir)
|
||||
A.New(T,dir,1)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user