From 68a8b055e3a3517e84c2322aec3cbc0d11ed1dff Mon Sep 17 00:00:00 2001 From: jm211 <81584204+JustinShurie@users.noreply.github.com> Date: Mon, 2 Dec 2024 12:15:18 -0500 Subject: [PATCH] STOR can absorb radiation particles (#978) --- src/simulation/elements/STOR.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/simulation/elements/STOR.cpp b/src/simulation/elements/STOR.cpp index 3e93a661c..e316e1280 100644 --- a/src/simulation/elements/STOR.cpp +++ b/src/simulation/elements/STOR.cpp @@ -66,7 +66,9 @@ static int update(UPDATE_FUNC_ARGS) if (rx || ry) { auto r = pmap[y+ry][x+rx]; - if ((ID(r))>=NPART || !r) + if (!r) + r= sim->photons[y+ry][x+rx]; + if (!r) continue; if (!parts[i].tmp && !parts[i].life && TYP(r)!=PT_STOR && !(elements[TYP(r)].Properties&TYPE_SOLID) && (!parts[i].ctype || TYP(r)==parts[i].ctype)) {