mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-10 18:34:21 +02:00
Fix collision detection for liquids on top of streamlines
This commit is contained in:
@@ -4492,7 +4492,7 @@ killed:
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// A particle of a different type, or a wall, was found. Stop trying to move any further horizontally unless the wall should be completely invisible to particles.
|
// A particle of a different type, or a wall, was found. Stop trying to move any further horizontally unless the wall should be completely invisible to particles.
|
||||||
if (bmap[ny/CELL][nx/CELL]!=WL_STREAM)
|
if ((pmap[ny][nx]&0xFF)!=t || bmap[ny/CELL][nx/CELL]!=WL_STREAM)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4542,7 +4542,7 @@ killed:
|
|||||||
if ((pmap[ny][nx]&0xFF)!=t || bmap[ny/CELL][nx/CELL])
|
if ((pmap[ny][nx]&0xFF)!=t || bmap[ny/CELL][nx/CELL])
|
||||||
{
|
{
|
||||||
s = do_move(i, clear_x, clear_y, nxf, nyf);
|
s = do_move(i, clear_x, clear_y, nxf, nyf);
|
||||||
if (s || bmap[ny/CELL][nx/CELL]!=WL_STREAM)
|
if (s || (pmap[ny][nx]&0xFF)!=t || bmap[ny/CELL][nx/CELL]!=WL_STREAM)
|
||||||
break; // found the edge of the liquid and movement into it succeeded, so stop moving down
|
break; // found the edge of the liquid and movement into it succeeded, so stop moving down
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user