diff options
Diffstat (limited to 'src/elements/elec.c')
| -rw-r--r-- | src/elements/elec.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/elements/elec.c b/src/elements/elec.c index 2ea1dfc..2746f49 100644 --- a/src/elements/elec.c +++ b/src/elements/elec.c @@ -65,21 +65,15 @@ int update_ELEC(UPDATE_FUNC_ARGS) { if(rand()%2) { create_part(r>>8, x+rx, y+ry, PT_H2); - part_change_type(i, x, y, PT_O2); - parts[i].life = 0; - parts[i].ctype = 0; - return 1; } else { create_part(r>>8, x+rx, y+ry, PT_O2); - part_change_type(i, x, y, PT_H2); - parts[i].life = 0; - parts[i].ctype = 0; - return 1; } + kill_part(i); + return 1; } - if ((r&0xFF)==PT_NEUT) + if ((r&0xFF)==PT_NEUT && !pmap[y+ry][x+rx]) { part_change_type(r>>8, x+rx, y+ry, PT_H2); parts[r>>8].life = 0; |
