diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-07-25 14:56:42 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-07-25 14:56:42 (GMT) |
| commit | 57c356e495f30c01a08bbd5d00b923f51badac9d (patch) | |
| tree | 13e7f63dbea9dff9d1803546b4bb61a3a3753183 /src/simulation/elements/ELEC.cpp | |
| parent | 6dc7eaf43e75a88ebb17b2bf7929a4ebf1fbf8ba (diff) | |
| download | powder-57c356e495f30c01a08bbd5d00b923f51badac9d.zip powder-57c356e495f30c01a08bbd5d00b923f51badac9d.tar.gz | |
TPT: Make ELEC+water form H2 and O2 in the correct proportions 9b2c2a78a6
Diffstat (limited to 'src/simulation/elements/ELEC.cpp')
| -rw-r--r-- | src/simulation/elements/ELEC.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/simulation/elements/ELEC.cpp b/src/simulation/elements/ELEC.cpp index e5884c6..ddaeac7 100644 --- a/src/simulation/elements/ELEC.cpp +++ b/src/simulation/elements/ELEC.cpp @@ -95,14 +95,14 @@ int Element_ELEC::update(UPDATE_FUNC_ARGS) } if ((r&0xFF)==PT_WATR || (r&0xFF)==PT_DSTW || (r&0xFF)==PT_SLTW || (r&0xFF)==PT_CBNW) { - if(rand()%2) + if(rand()<RAND_MAX/3) { - sim->create_part(r>>8, x+rx, y+ry, PT_H2); + sim->create_part(r>>8, x+rx, y+ry, PT_O2); return 1; } else { - sim->create_part(r>>8, x+rx, y+ry, PT_O2); + sim->create_part(r>>8, x+rx, y+ry, PT_H2); return 1; } } |
