Fix infinite air heat near the boundary

This commit is contained in:
Saveliy Skresanov
2025-06-21 23:25:02 +07:00
committed by Tamás Bálint Misius
parent b77a1cba2c
commit d30aa74ac6

View File

@@ -148,7 +148,7 @@ void Air::update_airh(void)
auto j = (int)ty;
tx -= i;
ty -= j;
if (!(bmap_blockairh[y][x]&0x8) && i>=2 && i<XCELLS-3 && j>=2 && j<YCELLS-3)
if (!(bmap_blockairh[y][x]&0x8) && i>=0 && i<XCELLS-1 && j>=0 && j<YCELLS-1)
{
auto odh = dh;
dh *= 1.0f - AIR_VADV;