Fix find mode not always succeeding in darkening particles

This commit is contained in:
Tamás Bálint Misius 2021-07-15 19:29:21 +02:00
parent 11188c85c3
commit d040de396a
No known key found for this signature in database
GPG Key ID: 5B472A12F6ECA9F2

View File

@ -1428,26 +1428,6 @@ void Renderer::render_parts()
}
}
if (findingElement)
{
if (TYP(findingElement) == parts[i].type &&
(parts[i].type != PT_LIFE || (ID(findingElement) == parts[i].ctype)))
{
colr = firer = 255;
colg = fireg = colb = fireb = 0;
foundElements++;
}
else
{
colr /= 10;
colg /= 10;
colb /= 10;
firer /= 5;
fireg /= 5;
fireb /= 5;
}
}
if (colour_mode & COLOUR_GRAD)
{
auto frequency = 0.05f;
@ -1479,6 +1459,26 @@ void Renderer::render_parts()
else if(firea<0) firea = 0;
#endif
if (findingElement)
{
if (TYP(findingElement) == parts[i].type &&
(parts[i].type != PT_LIFE || (ID(findingElement) == parts[i].ctype)))
{
colr = firer = 255;
colg = fireg = colb = fireb = 0;
foundElements++;
}
else
{
colr /= 10;
colg /= 10;
colb /= 10;
firer /= 5;
fireg /= 5;
fireb /= 5;
}
}
//Pixel rendering
if (pixel_mode & EFFECT_LINES)
{