insulators block ambient heat (when there are a lot nearby)
This commit is contained in:
parent
dcef255f47
commit
eaf0daec43
@ -84,7 +84,7 @@ void Air::update_airh(void)
|
||||
{
|
||||
if (y+j>0 && y+j<YRES/CELL-2 &&
|
||||
x+i>0 && x+i<XRES/CELL-2 &&
|
||||
!bmap_blockairh[y+j][x+i])
|
||||
!(bmap_blockairh[y+j][x+i]&0x8))
|
||||
{
|
||||
f = kernel[i+1+(j+1)*3];
|
||||
dh += hv[y+j][x+i]*f;
|
||||
@ -110,15 +110,15 @@ void Air::update_airh(void)
|
||||
{
|
||||
odh = dh;
|
||||
dh *= 1.0f - AIR_VADV;
|
||||
dh += AIR_VADV*(1.0f-tx)*(1.0f-ty)*(bmap_blockairh[j][i] ? odh : hv[j][i]);
|
||||
dh += AIR_VADV*tx*(1.0f-ty)*(bmap_blockairh[j][i+1] ? odh : hv[j][i+1]);
|
||||
dh += AIR_VADV*(1.0f-tx)*ty*(bmap_blockairh[j+1][i] ? odh : hv[j+1][i]);
|
||||
dh += AIR_VADV*tx*ty*(bmap_blockairh[j+1][i+1] ? odh : hv[j+1][i+1]);
|
||||
dh += AIR_VADV*(1.0f-tx)*(1.0f-ty)*((bmap_blockairh[j][i]&0x8) ? odh : hv[j][i]);
|
||||
dh += AIR_VADV*tx*(1.0f-ty)*((bmap_blockairh[j][i+1]&0x8) ? odh : hv[j][i+1]);
|
||||
dh += AIR_VADV*(1.0f-tx)*ty*((bmap_blockairh[j+1][i]&0x8) ? odh : hv[j+1][i]);
|
||||
dh += AIR_VADV*tx*ty*((bmap_blockairh[j+1][i+1]&0x8) ? odh : hv[j+1][i+1]);
|
||||
}
|
||||
if(!sim.gravityMode)
|
||||
{ //Vertical gravity only for the time being
|
||||
float airdiff = hv[y-1][x]-hv[y][x];
|
||||
if(airdiff>0 && !bmap_blockairh[y-1][x])
|
||||
if(airdiff>0 && !(bmap_blockairh[y-1][x]&0x8))
|
||||
vy[y][x] -= airdiff/5000.0f;
|
||||
}
|
||||
ohv[y][x] = dh;
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user