From e33fb40e2d670af84c8b27c69cc170c2213bcd33 Mon Sep 17 00:00:00 2001 From: Cracker64 Date: Fri, 14 Jan 2011 10:50:07 -0500 Subject: oops, didn't need the floodfill thing there. diff --git a/src/powder.c b/src/powder.c index 324a34f..e8e3873 100644 --- a/src/powder.c +++ b/src/powder.c @@ -24,6 +24,7 @@ int pfree; unsigned pmap[YRES][XRES]; unsigned cb_pmap[YRES][XRES]; +unsigned photons[YRES][XRES]; static int pn_junction_sprk(int x, int y, int pt) { @@ -580,7 +581,9 @@ inline int create_part(int p, int x, int y, int t) } } } - if(pfree == -1) + if(photons[y][x] && t==PT_PHOT) + return -1; + if(pfree == -1) return -1; i = pfree; pfree = parts[i].life; @@ -5950,7 +5953,7 @@ int flood_parts(int x, int y, int c, int cm, int bm) x1 = x2 = x; while(x1>=CELL) { - if((pmap[y][x1-1]&0xFF)!=cm || bmap[y/CELL][(x1-1)/CELL]!=bm || (photons[y][x1-1]&0xFF)!=cm) + if((pmap[y][x1-1]&0xFF)!=cm || bmap[y/CELL][(x1-1)/CELL]!=bm) { break; } @@ -5958,7 +5961,7 @@ int flood_parts(int x, int y, int c, int cm, int bm) } while(x2