summaryrefslogtreecommitdiff
path: root/src/simulation/elements/FILT.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-10-24 01:01:06 (GMT)
committer jacob1 <jfu614@gmail.com>2013-10-24 01:01:06 (GMT)
commit79a2ac3103815d10e83619fd36615f0c0909cf7a (patch)
tree0b44268392d16247b6c1bf337eb51b33e78514ca /src/simulation/elements/FILT.cpp
parentb4761e47ddac23f7a52b714e2e0631dda1708a79 (diff)
downloadpowder-79a2ac3103815d10e83619fd36615f0c0909cf7a.zip
powder-79a2ac3103815d10e83619fd36615f0c0909cf7a.tar.gz
fix issue with FILT PHOT scattering
Diffstat (limited to 'src/simulation/elements/FILT.cpp')
-rw-r--r--src/simulation/elements/FILT.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/simulation/elements/FILT.cpp b/src/simulation/elements/FILT.cpp
index 8ece142..36ea414 100644
--- a/src/simulation/elements/FILT.cpp
+++ b/src/simulation/elements/FILT.cpp
@@ -106,10 +106,9 @@ int Element_FILT::interactWavelengths(Particle* cpart, int origWl)
return (~origWl) & mask; // Invert colours
case 9:
{
- int t1, t2, t3, r;
- t1 = (origWl & 0x0000FF)+(rand()%5)-2;
- t1 = ((origWl & 0x00FF00)>>8)+(rand()%5)-2;
- t3 = ((origWl & 0xFF0000)>>16)+(rand()%5)-2;
+ int t1 = (origWl & 0x0000FF)+(rand()%5)-2;
+ int t2 = ((origWl & 0x00FF00)>>8)+(rand()%5)-2;
+ int t3 = ((origWl & 0xFF0000)>>16)+(rand()%5)-2;
return (origWl & 0xFF000000) | (t3<<16) | (t2<<8) | t1;
}
default: