diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-07-25 14:55:42 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-07-25 14:55:42 (GMT) |
| commit | 6dc7eaf43e75a88ebb17b2bf7929a4ebf1fbf8ba (patch) | |
| tree | 4bb1bbef03216b52fe783f60a61959727a5da736 /src/simulation/elements/ELEC.cpp | |
| parent | 08d1dd06ed77970a4ad5fe1b1db7bfbf857f74d5 (diff) | |
| download | powder-6dc7eaf43e75a88ebb17b2bf7929a4ebf1fbf8ba.zip powder-6dc7eaf43e75a88ebb17b2bf7929a4ebf1fbf8ba.tar.gz | |
TPT: Prevent stacking from ELEC+NEUT, ELEC+water, and CO2 from BUBW ae5470ca78
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; |
