From 9b2c2a78a6f4ba4fb13f04f17a649caeaf416d8d Mon Sep 17 00:00:00 2001 From: jacksonmj Date: Mon, 18 Jun 2012 11:56:50 +0100 Subject: [PATCH] Make ELEC+water form H2 and O2 in the correct proportions --- src/elements/elec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/elements/elec.c b/src/elements/elec.c index 2746f495b..3d8471d06 100644 --- a/src/elements/elec.c +++ b/src/elements/elec.c @@ -62,13 +62,13 @@ int update_ELEC(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()>8, x+rx, y+ry, PT_H2); + create_part(r>>8, x+rx, y+ry, PT_O2); } else { - create_part(r>>8, x+rx, y+ry, PT_O2); + create_part(r>>8, x+rx, y+ry, PT_H2); } kill_part(i); return 1;