diff --git a/src/simulation/elements/FILT.cpp b/src/simulation/elements/FILT.cpp index 9c7615f8a..8ece14215 100644 --- a/src/simulation/elements/FILT.cpp +++ b/src/simulation/elements/FILT.cpp @@ -104,6 +104,14 @@ int Element_FILT::interactWavelengths(Particle* cpart, int origWl) return origWl ^ filtWl; // XOR colours case 8: 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; + return (origWl & 0xFF000000) | (t3<<16) | (t2<<8) | t1; + } default: return filtWl; } diff --git a/src/simulation/elements/PHOT.cpp b/src/simulation/elements/PHOT.cpp index e132d3d50..4fe5bbec2 100644 --- a/src/simulation/elements/PHOT.cpp +++ b/src/simulation/elements/PHOT.cpp @@ -88,6 +88,11 @@ int Element_PHOT::update(UPDATE_FUNC_ARGS) parts[i].ctype = 0x1F<<(rand()%26); parts[i].life++; //Delay death } + else if ((r&0xFF) == PT_FILT && parts[r>>8].tmp==9) + { + parts[i].vx += ((float)(rand()%1000-500))/1000.0f; + parts[i].vy += ((float)(rand()%1000-500))/1000.0f; + } } return 0; }