From fb02d57aca25427976f3ec35ead02d25cab7e7ae Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Mon, 20 Aug 2012 14:08:27 +0100 Subject: TPT: Fix salt/water proportions when dissolving into DSTW as well diff --git a/src/simulation/elements/DSTW.cpp b/src/simulation/elements/DSTW.cpp index c219786..8b16107 100644 --- a/src/simulation/elements/DSTW.cpp +++ b/src/simulation/elements/DSTW.cpp @@ -60,13 +60,15 @@ int Element_DSTW::update(UPDATE_FUNC_ARGS) if ((r&0xFF)==PT_SALT && 1>(rand()%250)) { sim->part_change_type(i,x,y,PT_SLTW); - sim->part_change_type(r>>8,x+rx,y+ry,PT_SLTW); + // on average, convert 3 DSTW to SLTW before SALT turns into SLTW + if (rand()%3==0) + sim->part_change_type(r>>8,x+rx,y+ry,PT_SLTW); } if (((r&0xFF)==PT_WATR||(r&0xFF)==PT_SLTW) && 1>(rand()%500)) { sim->part_change_type(i,x,y,PT_WATR); } - if ((r&0xFF)==PT_SLTW && 1>(rand()%500)) + if ((r&0xFF)==PT_SLTW && 1>(rand()%10000)) { sim->part_change_type(i,x,y,PT_SLTW); } -- cgit v0.9.2-21-gd62e