From 583bf2a091c5856a39d9c11dd9f0fdbe582efa7f Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 12 Jun 2012 18:51:38 +0100 Subject: TPT: Fix the bug where gel didn't transfer water from sponge. 0cf636ad24 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; -- cgit v0.9.2-21-gd62e