Titanium only blocks air when it is connected
This commit is contained in:
parent
2fb1da2fed
commit
04a09d997d
@ -16,7 +16,28 @@
|
||||
#include <element.h>
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user