Viscosity change for gel. Water diffusion among sponge and gel (but with

flying cake effect)
This commit is contained in:
savask 2012-04-15 21:46:16 +07:00
parent 8523da398f
commit c9bcc11d35
2 changed files with 10 additions and 0 deletions

View File

@ -29,6 +29,12 @@ int update_GEL(UPDATE_FUNC_ARGS) {
parts[i].tmp--; parts[i].tmp--;
} }
if ((r&0xFF)==PT_SPNG && (parts[r>>8].life+1)<parts[i].tmp)
{
parts[r>>8].life++;
parts[i].tmp--;
}
float dx, dy; float dx, dy;
dx = parts[i].x - parts[r>>8].x; dx = parts[i].x - parts[r>>8].x;
dy = parts[i].y - parts[r>>8].y; dy = parts[i].y - parts[r>>8].y;

View File

@ -2515,6 +2515,10 @@ killed:
rt = 30;//slight less water lag, although it changes how it moves a lot rt = 30;//slight less water lag, although it changes how it moves a lot
else else
rt = 10; 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<clear_x+rt && j<XRES; j+=r) for (j=clear_x+r; j>=0 && j>=clear_x-rt && j<clear_x+rt && j<XRES; j+=r)
{ {
if (((pmap[fin_y][j]&0xFF)!=t || bmap[fin_y/CELL][j/CELL]) if (((pmap[fin_y][j]&0xFF)!=t || bmap[fin_y/CELL][j/CELL])