summaryrefslogtreecommitdiff
path: root/src/powder.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/powder.c')
-rw-r--r--src/powder.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/powder.c b/src/powder.c
index a1fa55e..8e5139a 100644
--- a/src/powder.c
+++ b/src/powder.c
@@ -709,6 +709,11 @@ inline int create_part(int p, int x, int y, int tv)//the function for creating a
if (t==PT_SPRK)
{
+ if((pmap[y][x]>>8)==PT_WIRE)
+ {
+ parts[pmap[y][x]>>8].ctype=1;
+ return -1;
+ }
if ((pmap[y][x]>>8)>=NPART || !((pmap[y][x]&0xFF)==PT_INST||(ptypes[pmap[y][x]&0xFF].properties&PROP_CONDUCTS)))
return -1;
if (parts[pmap[y][x]>>8].life!=0)
@@ -1466,6 +1471,15 @@ void update_particles_i(pixel *vid, int start, int inc)
}
}
}
+ //wire!
+ for (nx=0; nx<XRES; nx++)
+ for (ny=0; ny<YRES; ny++)
+ {
+ r = pmap[ny][nx];
+ if ((r>>8)>=NPART || !r)
+ continue;
+ parts[r>>8].tmp=parts[r>>8].ctype;
+ }
//game of life!
if (ISGOL==1&&++CGOL>=GSPEED)//GSPEED is frames per generation
{