diff --git a/src/simulation/Air.cpp b/src/simulation/Air.cpp index 59a5a9e3a..f2f1f8850 100644 --- a/src/simulation/Air.cpp +++ b/src/simulation/Air.cpp @@ -84,7 +84,7 @@ void Air::update_airh(void) { if (y+j>0 && y+j0 && x+i0 && !bmap_blockairh[y-1][x]) + if(airdiff>0 && !(bmap_blockairh[y-1][x]&0x8)) vy[y][x] -= airdiff/5000.0f; } ohv[y][x] = dh; diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index d1478c216..53145c686 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -4023,7 +4023,12 @@ void Simulation::update_particles_i(int start, int inc) } } } - else parts[i].temp = restrict_flt(parts[i].temp, MIN_TEMP, MAX_TEMP); + else + { + if (!(air->bmap_blockairh[y/CELL][x/CELL]&0x8)) + air->bmap_blockairh[y/CELL][x/CELL]++; + parts[i].temp = restrict_flt(parts[i].temp, MIN_TEMP, MAX_TEMP); + } } if (t==PT_LIFE) @@ -4739,7 +4744,7 @@ void Simulation::update_particles()//doesn't update the particles themselves, bu if (emap[y][x]) emap[y][x] --; air->bmap_blockair[y][x] = (bmap[y][x]==WL_WALL || bmap[y][x]==WL_WALLELEC || (bmap[y][x]==WL_EWALL && !emap[y][x])); - air->bmap_blockairh[y][x] = (bmap[y][x]==WL_WALL || bmap[y][x]==WL_WALLELEC || bmap[y][x]==WL_GRAV || (bmap[y][x]==WL_EWALL && !emap[y][x])); + air->bmap_blockairh[y][x] = (bmap[y][x]==WL_WALL || bmap[y][x]==WL_WALLELEC || bmap[y][x]==WL_GRAV || (bmap[y][x]==WL_EWALL && !emap[y][x])) ? 0x8:0; } } } diff --git a/src/simulation/elements/TTAN.cpp b/src/simulation/elements/TTAN.cpp index 3f997f7e0..248aba2a9 100644 --- a/src/simulation/elements/TTAN.cpp +++ b/src/simulation/elements/TTAN.cpp @@ -67,7 +67,7 @@ int Element_TTAN::update(UPDATE_FUNC_ARGS) if(ttan>=2) { sim->air->bmap_blockair[y/CELL][x/CELL] = 1; - sim->air->bmap_blockairh[y/CELL][x/CELL] = 1; + sim->air->bmap_blockairh[y/CELL][x/CELL] = 0x8; } return 0; }