summaryrefslogtreecommitdiff
path: root/src/simulation/elements/GEL.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-06-12 17:51:38 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-06-12 17:51:38 (GMT)
commit583bf2a091c5856a39d9c11dd9f0fdbe582efa7f (patch)
tree9e60f15d67ef5684a7fc6e11467a008f704ebcf3 /src/simulation/elements/GEL.cpp
parent1ccdc1dc12d8a1d0ea6921da4df2ecbef7940de5 (diff)
downloadpowder-583bf2a091c5856a39d9c11dd9f0fdbe582efa7f.zip
powder-583bf2a091c5856a39d9c11dd9f0fdbe582efa7f.tar.gz
TPT: Fix the bug where gel didn't transfer water from sponge. 0cf636ad24
Diffstat (limited to 'src/simulation/elements/GEL.cpp')
-rw-r--r--src/simulation/elements/GEL.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/simulation/elements/GEL.cpp b/src/simulation/elements/GEL.cpp
index 79179ea..6829769 100644
--- a/src/simulation/elements/GEL.cpp
+++ b/src/simulation/elements/GEL.cpp
@@ -68,6 +68,12 @@ int Element_GEL::update(UPDATE_FUNC_ARGS)
sim->kill_part(r>>8);
}
+ if ((r&0xFF)==PT_SPNG && parts[i].tmp<100 && ((parts[r>>8].life+1)>parts[i].tmp))
+ {
+ parts[r>>8].life--;
+ parts[i].tmp++;
+ }
+
char gel = 0;
if ((r&0xFF)==PT_GEL)
gel = 1;