Fix GoL to not set gol2 on other things

This commit is contained in:
Cracker64 2011-02-23 13:33:36 -05:00
parent bdcc6e3fba
commit cf80586ddc

View File

@ -1319,10 +1319,14 @@ void update_particles_i(pixel *vid, int start, int inc)
gol[nx][ny] = golnum;
for ( nnx=-1; nnx<2; nnx++)
for ( nny=-1; nny<2; nny++)//it will count itself as its own neighbor, which is needed, but will have 1 extra for delete check
{
rt = pmap[((ny+nny+YRES-3*CELL)%(YRES-2*CELL))+CELL][((nx+nnx+XRES-3*CELL)%(XRES-2*CELL))+CELL];
if (!rt || ptypes[rt&0xFF].properties&PROP_LIFE)
{
gol2[((nx+nnx+XRES-3*CELL)%(XRES-2*CELL))+CELL][((ny+nny+YRES-3*CELL)%(YRES-2*CELL))+CELL][golnum] ++;
gol2[((nx+nnx+XRES-3*CELL)%(XRES-2*CELL))+CELL][((ny+nny+YRES-3*CELL)%(YRES-2*CELL))+CELL][0] ++;
}
}
} else {
parts[r>>8].tmp --;
if(parts[r>>8].tmp<=0)