Fix infinite air in the lower right corner #580 .

This commit is contained in:
Saveliy Skresanov
2025-02-21 21:41:17 +07:00
parent 0eed65ae80
commit 3b19f846b9

View File

@@ -133,7 +133,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>=2 && i<XCELLS-3 && j>=2 && j<YCELLS-3)
{
auto odh = dh;
dh *= 1.0f - AIR_VADV;
@@ -333,7 +333,7 @@ void Air::update_air(void)
auto j = (int)ty;
tx -= i;
ty -= j;
if (!bmap_blockair[y][x] && i>=2 && i<=XCELLS-3 && j>=2 && j<=YCELLS-3)
if (!bmap_blockair[y][x] && i>=2 && i<XCELLS-3 && j>=2 && j<YCELLS-3)
{
dx *= 1.0f - AIR_VADV;
dy *= 1.0f - AIR_VADV;