diff options
Diffstat (limited to 'src/simulation/elements/ELEC.cpp')
| -rw-r--r-- | src/simulation/elements/ELEC.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/simulation/elements/ELEC.cpp b/src/simulation/elements/ELEC.cpp index 4dd17be..e5884c6 100644 --- a/src/simulation/elements/ELEC.cpp +++ b/src/simulation/elements/ELEC.cpp @@ -98,21 +98,15 @@ int Element_ELEC::update(UPDATE_FUNC_ARGS) if(rand()%2) { sim->create_part(r>>8, x+rx, y+ry, PT_H2); - sim->part_change_type(i, x, y, PT_O2); - parts[i].life = 0; - parts[i].ctype = 0; return 1; } else { sim->create_part(r>>8, x+rx, y+ry, PT_O2); - sim->part_change_type(i, x, y, PT_H2); - parts[i].life = 0; - parts[i].ctype = 0; return 1; } } - if ((r&0xFF)==PT_NEUT) + if ((r&0xFF)==PT_NEUT && !pmap[y+ry][x+rx]) { sim->part_change_type(r>>8, x+rx, y+ry, PT_H2); parts[r>>8].life = 0; |
