From ad4ef65cb3f9656c6903971895972d1e202dae31 Mon Sep 17 00:00:00 2001 From: cxi Date: Sat, 10 Sep 2016 09:51:07 -0700 Subject: [PATCH] Make CRAY copy its own life to particles it creates (#335) --- src/simulation/elements/CRAY.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/simulation/elements/CRAY.cpp b/src/simulation/elements/CRAY.cpp index 1caca535fb..f22f141b93 100644 --- a/src/simulation/elements/CRAY.cpp +++ b/src/simulation/elements/CRAY.cpp @@ -30,7 +30,7 @@ Element_CRAY::Element_CRAY() HeatConduct = 0; Description = "Particle Ray Emitter. Creates a beam of particles set by its ctype, with a range set by tmp."; - Properties = TYPE_SOLID|PROP_LIFE_DEC; + Properties = TYPE_SOLID; LowPressure = IPL; LowPressureTransition = NT; @@ -68,7 +68,7 @@ int Element_CRAY::update(UPDATE_FUNC_ARGS) } } // only fire when life is 0, but nothing sets the life right now - else if (parts[i].life==0) + else { for (int rx =-1; rx <= 1; rx++) for (int ry = -1; ry <= 1; ry++) @@ -98,6 +98,8 @@ int Element_CRAY::update(UPDATE_FUNC_ARGS) if (colored) parts[nr].dcolour = colored; parts[nr].temp = parts[i].temp; + if (parts[i].life>0) + parts[nr].life = parts[i].life; if(!--partsRemaining) docontinue = 0; }