fixed tiny bug where it wouldnt diffuse

This commit is contained in:
Philip
2010-11-10 18:02:40 -05:00
parent e47c60c07a
commit 673eb2437e

View File

@@ -1916,7 +1916,7 @@ void update_particles_i(pixel *vid, int start, int inc)
x+nx<XRES && y+ny<YRES && (nx || ny))
{
r = pmap[y+ny][x+nx];
if(parts[r>>8].type==t&&(parts[i].life>parts[r>>8].life)&&parts[i].life>0)//diffusion
if(parts[r>>8].type==t&&(parts[i].life>parts[r>>8].life)&&parts[i].life>0&&!((r>>8)>=NPART || !r))//diffusion
{
parts[r>>8].life ++;
parts[i].life --;