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

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) if (colour_mode & COLOUR_GRAD)
{ {
auto frequency = 0.05f; auto frequency = 0.05f;
@@ -1479,6 +1459,26 @@ void Renderer::render_parts()
else if(firea<0) firea = 0; else if(firea<0) firea = 0;
#endif #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 //Pixel rendering
if (pixel_mode & EFFECT_LINES) if (pixel_mode & EFFECT_LINES)
{ {