From 59920c1a622f507b63c3e6308c376287c33ced58 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Wed, 13 Jun 2012 01:03:21 +0100 Subject: [PATCH] TPT: TTAN updates --- src/simulation/elements/TTAN.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/simulation/elements/TTAN.cpp b/src/simulation/elements/TTAN.cpp index 00ba5fcdd..66fc76be9 100644 --- a/src/simulation/elements/TTAN.cpp +++ b/src/simulation/elements/TTAN.cpp @@ -50,8 +50,25 @@ Element_TTAN::Element_TTAN() //#TPT-Directive ElementHeader Element_TTAN static int update(UPDATE_FUNC_ARGS) int Element_TTAN::update(UPDATE_FUNC_ARGS) { - sim->air->bmap_blockair[y/CELL][x/CELL] = 1; - sim->air->bmap_blockairh[y/CELL][x/CELL] = 1; + int nx, ny, ttan = 0; + if(nt<=2) + ttan = 2; + else if(parts[i].tmp) + ttan = 2; + else if(nt<=6) + for (nx=-1; nx<2; nx++) { + for (ny=-1; ny<2; ny++) { + if ((!nx != !ny) && x+nx>=0 && y+ny>=0 && x+nx=2) { + sim->air->bmap_blockair[y/CELL][x/CELL] = 1; + sim->air->bmap_blockairh[y/CELL][x/CELL] = 1; + } return 0; }