diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-06-07 18:17:50 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-06-07 18:17:50 (GMT) |
| commit | 04a09d997d3afc9d99255b469aa24ede2b25e881 (patch) | |
| tree | b7a4e48adf9e6c7f347f151b489190cf67e63dd3 /src/elements | |
| parent | 2fb1da2fedf1f85463fa18fe6032804f0a85410f (diff) | |
| download | powder-04a09d997d3afc9d99255b469aa24ede2b25e881.zip powder-04a09d997d3afc9d99255b469aa24ede2b25e881.tar.gz | |
Titanium only blocks air when it is connected
Diffstat (limited to 'src/elements')
| -rw-r--r-- | src/elements/ttan.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/src/elements/ttan.c b/src/elements/ttan.c index 82d2897..d0ff4ce 100644 --- a/src/elements/ttan.c +++ b/src/elements/ttan.c @@ -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; } |
