summaryrefslogtreecommitdiff
path: root/src/simulation/elements/DSTW.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-08-20 13:08:27 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-08-20 13:08:27 (GMT)
commitfb02d57aca25427976f3ec35ead02d25cab7e7ae (patch)
tree442e0fa10ab2430b79ff511aaeb8debf3223a7b8 /src/simulation/elements/DSTW.cpp
parent29283b038c4c7966e656e38b3ff25574521b543d (diff)
downloadpowder-fb02d57aca25427976f3ec35ead02d25cab7e7ae.zip
powder-fb02d57aca25427976f3ec35ead02d25cab7e7ae.tar.gz
TPT: Fix salt/water proportions when dissolving into DSTW as well
Diffstat (limited to 'src/simulation/elements/DSTW.cpp')
-rw-r--r--src/simulation/elements/DSTW.cpp6
1 files changed, 4 insertions, 2 deletions
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);
}