From 2e52e209a66335cece95e58f98141e1ba30a14aa Mon Sep 17 00:00:00 2001 From: jacksonmj Date: Sun, 8 Sep 2013 17:32:25 +0100 Subject: [PATCH] CRAY: only set decoration colour after passing through FILT --- src/simulation/Simulation.cpp | 5 +++++ src/simulation/elements/CRAY.cpp | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 03c4dd2e9..92be51511 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -2689,6 +2689,11 @@ int Simulation::create_part(int p, int x, int y, int tv) parts[index].ctype = PT_DUST; return index; } + if (p==-2 && ((elements[type].Properties & PROP_DRAWONCTYPE) || type==PT_CRAY)) + { + parts[index].ctype = PT_SPRK; + return -1; + } if (!(type == PT_INST || (elements[type].Properties&PROP_CONDUCTS)) || parts[index].life!=0) return -1; if (p == -2 && type == PT_INST) diff --git a/src/simulation/elements/CRAY.cpp b/src/simulation/elements/CRAY.cpp index b906c3368..002ed283c 100644 --- a/src/simulation/elements/CRAY.cpp +++ b/src/simulation/elements/CRAY.cpp @@ -96,7 +96,8 @@ int Element_CRAY::update(UPDATE_FUNC_ARGS) else nr = sim->create_part(-1, x+nxi+nxx, y+nyi+nyy, parts[i].ctype); if (nr!=-1) { - parts[nr].dcolour = colored; + if (colored) + parts[nr].dcolour = colored; parts[nr].temp = parts[i].temp; if(!--partsRemaining) docontinue = 0;