From cf80586ddc0e49e8bde1326af69d22016e9aede3 Mon Sep 17 00:00:00 2001 From: Cracker64 Date: Wed, 23 Feb 2011 13:33:36 -0500 Subject: [PATCH] Fix GoL to not set gol2 on other things --- src/powder.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/powder.c b/src/powder.c index 2cb8e24b8..605964095 100644 --- a/src/powder.c +++ b/src/powder.c @@ -1320,8 +1320,12 @@ void update_particles_i(pixel *vid, int start, int inc) 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 { - 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] ++; + 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 --;