From 11997cf3ad183d821c3103c0b553658eba554522 Mon Sep 17 00:00:00 2001 From: jacksonmj Date: Thu, 27 Mar 2014 19:36:51 +0000 Subject: [PATCH] Prevent red BRAY from affecting FILT colour via DTEC --- src/simulation/elements/ARAY.cpp | 1 + src/simulation/elements/BRAY.cpp | 4 ++-- src/simulation/elements/DTEC.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/simulation/elements/ARAY.cpp b/src/simulation/elements/ARAY.cpp index a0626b697e..96d75b9236 100644 --- a/src/simulation/elements/ARAY.cpp +++ b/src/simulation/elements/ARAY.cpp @@ -138,6 +138,7 @@ int Element_ARAY::update(UPDATE_FUNC_ARGS) } } else if (destroy) { if ((r&0xFF)==PT_BRAY) { + parts[r>>8].tmp = 2; parts[r>>8].life = 1; docontinue = 1; //this if prevents red BRAY from stopping on certain materials diff --git a/src/simulation/elements/BRAY.cpp b/src/simulation/elements/BRAY.cpp index 285c065852..ed521bd9c3 100644 --- a/src/simulation/elements/BRAY.cpp +++ b/src/simulation/elements/BRAY.cpp @@ -55,7 +55,7 @@ int Element_BRAY::graphics(GRAPHICS_FUNC_ARGS) { trans = cpart->life * 7; if (trans>255) trans = 255; - if (cpart->ctype) { + if (cpart->ctype&0x3FFFFFFF) { *colg = 0; *colb = 0; *colr = 0; @@ -75,7 +75,7 @@ int Element_BRAY::graphics(GRAPHICS_FUNC_ARGS) { trans = cpart->life/4; if (trans>255) trans = 255; - if (cpart->ctype) { + if (cpart->ctype&0x3FFFFFFF) { *colg = 0; *colb = 0; *colr = 0; diff --git a/src/simulation/elements/DTEC.cpp b/src/simulation/elements/DTEC.cpp index a827d57a4f..259dd2fd53 100644 --- a/src/simulation/elements/DTEC.cpp +++ b/src/simulation/elements/DTEC.cpp @@ -86,7 +86,7 @@ int Element_DTEC::update(UPDATE_FUNC_ARGS) continue; if ((r&0xFF) == parts[i].ctype && (parts[i].ctype != PT_LIFE || parts[i].tmp == parts[r>>8].ctype || !parts[i].tmp)) parts[i].life = 1; - if ((r&0xFF) == PT_PHOT || (r&0xFF) == PT_BRAY) + if ((r&0xFF) == PT_PHOT || ((r&0xFF) == PT_BRAY && parts[r>>8].tmp!=2)) { setFilt = true; photonWl = parts[r>>8].ctype;