From 1fdaabca6d7d6ba4fd968b47693282b32e705264 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 18 Apr 2012 21:20:31 +0100 Subject: TPT: Viscosity change for gel. Water diffusion among sponge and gel (but with flying cake effect) c9bcc11d35 diff --git a/src/elements/gel.cpp b/src/elements/gel.cpp index 9092097..2031af1 100644 --- a/src/elements/gel.cpp +++ b/src/elements/gel.cpp @@ -29,6 +29,12 @@ int update_GEL(UPDATE_FUNC_ARGS) { parts[i].tmp--; } + if ((r&0xFF)==PT_SPNG && (parts[r>>8].life+1)>8].life++; + parts[i].tmp--; + } + float dx, dy; dx = parts[i].x - parts[r>>8].x; dy = parts[i].y - parts[r>>8].y; diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index b08398f..853a7f0 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -3272,6 +3272,10 @@ killed: rt = 30;//slight less water lag, although it changes how it moves a lot else rt = 10; + + if (t==PT_GEL) + rt = parts[i].tmp*0.20f+5.0f; + for (j=clear_x+r; j>=0 && j>=clear_x-rt && j