diff --git a/src/graphics.c b/src/graphics.c index db5ae5283..a384340cf 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1885,15 +1885,6 @@ void render_parts(pixel *vid) cola = 255; if(pixel_mode & (FIREMODE | PMODE_GLOW)) pixel_mode = (pixel_mode & ~(FIREMODE|PMODE_GLOW)) | PMODE_BLUR; } - else if (colour_mode & COLOUR_GRAD) - { - float frequency = 0.05; - int q = parts[i].temp-40; - colr = sin(frequency*q) * 16 + colr; - colg = sin(frequency*q) * 16 + colg; - colb = sin(frequency*q) * 16 + colb; - if(pixel_mode & (FIREMODE | PMODE_GLOW)) pixel_mode = (pixel_mode & ~(FIREMODE|PMODE_GLOW)) | PMODE_BLUR; - } else if (colour_mode & COLOUR_BASC) { colr = PIXR(ptypes[t].pcolors); @@ -1903,7 +1894,7 @@ void render_parts(pixel *vid) } //Apply decoration colour - if(!colour_mode) + if(!(colour_mode & ~COLOUR_GRAD)) { if(!(pixel_mode & NO_DECO) && decorations_enable) { @@ -1919,6 +1910,16 @@ void render_parts(pixel *vid) fireb = (deca*decb + (255-deca)*fireb) >> 8; } } + + if (colour_mode & COLOUR_GRAD) + { + float frequency = 0.05; + int q = parts[i].temp-40; + colr = sin(frequency*q) * 16 + colr; + colg = sin(frequency*q) * 16 + colg; + colb = sin(frequency*q) * 16 + colb; + if(pixel_mode & (FIREMODE | PMODE_GLOW)) pixel_mode = (pixel_mode & ~(FIREMODE|PMODE_GLOW)) | PMODE_BLUR; + } #ifndef OGLR //All colours are now set, check ranges