diff --git a/src/graphics.c b/src/graphics.c index 47af4e1b8..b92f12cc4 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -2516,7 +2516,7 @@ void draw_parts(pixel *vid) } else if (t==PT_LCRY) { - uint8 GR = 0x50+(parts[i].life*10); + uint8 GR = 0x50+((parts[i].life>10?10:parts[i].life)*10); vid[ny*(XRES+BARSIZE)+nx] = PIXRGB(GR, GR, GR); if (cmode == CM_BLOB) { blendpixel(vid, nx+1, ny, GR, GR, GR, 223); @@ -2532,7 +2532,7 @@ void draw_parts(pixel *vid) } else if (t==PT_PCLN) { - uint8 GR = 0x3B+(parts[i].life*19); + uint8 GR = 0x3B+((parts[i].life>10?10:parts[i].life)*19); vid[ny*(XRES+BARSIZE)+nx] = PIXRGB(GR, GR, 10); if (cmode == CM_BLOB) { blendpixel(vid, nx+1, ny, GR, GR, 10, 223); @@ -2548,7 +2548,7 @@ void draw_parts(pixel *vid) } else if (t==PT_HSWC) { - uint8 GR = 0x3B+(parts[i].life*19); + uint8 GR = 0x3B+((parts[i].life>10?10:parts[i].life)*19); vid[ny*(XRES+BARSIZE)+nx] = PIXRGB(GR, 10, 10); if (cmode == CM_BLOB) { blendpixel(vid, nx+1, ny, GR, 10, 10, 223); @@ -2564,7 +2564,7 @@ void draw_parts(pixel *vid) } else if (t==PT_PUMP) { - uint8 GR = 0x3B+(parts[i].life*19); + uint8 GR = 0x3B+((parts[i].life>10?10:parts[i].life)*19); vid[ny*(XRES+BARSIZE)+nx] = PIXRGB(10, 10, GR); if (cmode == CM_BLOB) { blendpixel(vid, nx+1, ny, 10, 10, GR, 223);