diff --git a/src/elements/ttan.c b/src/elements/ttan.c index 82d2897c2..d0ff4ceed 100644 --- a/src/elements/ttan.c +++ b/src/elements/ttan.c @@ -16,7 +16,28 @@ #include int update_TTAN(UPDATE_FUNC_ARGS) { - bmap_blockair[y/CELL][x/CELL] = 1; - bmap_blockairh[y/CELL][x/CELL] = 1; + int nx, ny, ttan = 0; + if(nt<8) + { + for (nx=-1; nx<2; nx++) + for (ny=-1; ny<2; ny++) { + if (!nx != !ny) { + if((pmap[y+ny][x+nx]&0xFF)==PT_TTAN) + { + ttan++; + } + } + } + if(ttan>=2) + { + bmap_blockair[y/CELL][x/CELL] = 1; + bmap_blockairh[y/CELL][x/CELL] = 1; + } + } + if(parts[i].tmp) + { + bmap_blockair[y/CELL][x/CELL] = 1; + bmap_blockairh[y/CELL][x/CELL] = 1; + } return 0; } diff --git a/src/powder.c b/src/powder.c index 82d52b7aa..dc8bb3bbf 100644 --- a/src/powder.c +++ b/src/powder.c @@ -1905,16 +1905,16 @@ void update_particles_i(pixel *vid, int start, int inc) #endif } - j = surround_space = nt = 0;//if nt is 1 after this, then there is a particle around the current particle, that is NOT the current particle's type, for water movement. + j = surround_space = nt = 0;//if nt is greater than 1 after this, then there is a particle around the current particle, that is NOT the current particle's type, for water movement. for (nx=-1; nx<2; nx++) for (ny=-1; ny<2; ny++) { if (nx||ny) { surround[j] = r = pmap[y+ny][x+nx]; j++; if (!(r&0xFF)) - surround_space = 1;//there is empty space + surround_space++;//there is empty space if ((r&0xFF)!=t) - nt = 1;//there is nothing or a different particle + nt++;//there is nothing or a different particle } }