Fix acid drawing and 'purple acid'

This commit is contained in:
Simon 2011-01-05 20:36:09 +00:00
parent e2d4ae5763
commit a46a484f2e
2 changed files with 20 additions and 12 deletions

View File

@ -1934,13 +1934,21 @@ void draw_parts(pixel *vid)
} }
else if(t==PT_ACID) else if(t==PT_ACID)
{ {
if(parts[i].life>255) parts[i].life = 255; if(parts[i].life>75) parts[i].life = 75;
if(parts[i].life<47) parts[i].life = 48; if(parts[i].life<49) parts[i].life = 49;
s = (255/((parts[i].life-46)*28)); s = (parts[i].life-49)*3;
if(s==0) s = 1; if(s==0) s = 1;
cr = PIXR(ptypes[t].pcolors)/s; cr = 0x86 + s*4;
cg = PIXG(ptypes[t].pcolors)/s; cg = 0x36 + s*1;
cb = PIXB(ptypes[t].pcolors)/s; cb = 0x90 + s*2;
if(cr>=255)
cr = 255;
if(cg>=255)
cg = 255;
if(cb>=255)
cb = 255;
blendpixel(vid, nx, ny, cr, cg, cb, 255); blendpixel(vid, nx, ny, cr, cg, cb, 255);
if(cmode==CM_BLOB) if(cmode==CM_BLOB)

View File

@ -2501,7 +2501,7 @@ void update_particles_i(pixel *vid, int start, int inc)
parts[r>>8].type = PT_NONE; parts[r>>8].type = PT_NONE;
} }
} }
else if (parts[i].life==50) else if (parts[i].life<=50)
{ {
parts[i].life = 0; parts[i].life = 0;
t = parts[i].type = PT_NONE; t = parts[i].type = PT_NONE;