diff options
| author | FacialTurd <simon@hardwired.org.uk> | 2010-09-27 19:34:04 (GMT) |
|---|---|---|
| committer | FacialTurd <simon@hardwired.org.uk> | 2010-09-27 19:34:04 (GMT) |
| commit | 0a9d6adca47eae3b2c06c958a69352adeda4daca (patch) | |
| tree | 1680ce6b367099ad09a57746293f93ecb02350d3 /src | |
| parent | e3bbf00333a85c323bb7da97cb75e7e9788ee697 (diff) | |
| download | powder-0a9d6adca47eae3b2c06c958a69352adeda4daca.zip powder-0a9d6adca47eae3b2c06c958a69352adeda4daca.tar.gz | |
Makes insulator block electrodes
Diffstat (limited to 'src')
| -rw-r--r-- | src/powder.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/powder.c b/src/powder.c index 5400b7b..15a2afe 100644 --- a/src/powder.c +++ b/src/powder.c @@ -447,6 +447,7 @@ _inline int parts_avg(int ci, int ni) } } + int nearest_part(int ci, int t) { int distance = sqrt(pow(XRES, 2)+pow(YRES, 2)); @@ -705,7 +706,7 @@ void update_particles_i(pixel *vid, int start, int inc) if(t==PT_SPRK&&parts[i].ctype==PT_ETRD&&parts[i].life==1) { nearp = nearest_part(i, PT_ETRD); - if(nearp!=-1) + if(nearp!=-1&&parts_avg(i, nearp)!=PT_INSL) { create_line((int)parts[i].x, (int)parts[i].y, (int)parts[nearp].x, (int)parts[nearp].y, 0, PT_PLSM); t = parts[i].type = PT_ETRD; |
