From 6052ef6179f7abe20247fe249f5256774e719b6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20B=C3=A1lint=20Misius?= Date: Wed, 7 Oct 2020 10:53:10 +0200 Subject: [PATCH] Make energy particles visible to LSNS ant HSWC for deserialization --- src/simulation/elements/HSWC.cpp | 2 ++ src/simulation/elements/LSNS.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/simulation/elements/HSWC.cpp b/src/simulation/elements/HSWC.cpp index 8f4b34dd1..268130d39 100644 --- a/src/simulation/elements/HSWC.cpp +++ b/src/simulation/elements/HSWC.cpp @@ -63,6 +63,8 @@ static int update(UPDATE_FUNC_ARGS) if (BOUNDS_CHECK && (rx || ry)) { r = pmap[y+ry][x+rx]; + if (!r) + r = sim->photons[y+ry][x+rx]; if (!r) continue; if (TYP(r) == PT_HSWC) diff --git a/src/simulation/elements/LSNS.cpp b/src/simulation/elements/LSNS.cpp index 9501023fa..dfe941157 100644 --- a/src/simulation/elements/LSNS.cpp +++ b/src/simulation/elements/LSNS.cpp @@ -124,6 +124,8 @@ static int update(UPDATE_FUNC_ARGS) if (BOUNDS_CHECK && (rx || ry)) { int r = pmap[y + ry][x + rx]; + if (!r) + r = sim->photons[y + ry][x + rx]; if (!r) continue; int nx = x + rx;