Fix flood_water movement cancel check
This fixes a crash with water equalization on, with loop mode enabled, when there are high velocity particles near the edges. This can be occasionally reproduced with id:2800901 The water was moved to a new position and pmap updated, but the movement code continued, assuming water was at its old position. pmap for the WATR's old position won't be cleared once it moves, leaving a stale entry. If a particle then looks up the water in that location and tries to swap positions, this can cause a crash at the end of try_move
This commit is contained in:
parent
5582d6881d
commit
0ed8d0a0be
@ -4441,7 +4441,7 @@ killed:
|
||||
// Checking stagnant is cool, but then it doesn't update when you change it later.
|
||||
if (water_equal_test && elements[t].Falldown == 2 && RNG::Ref().chance(1, 200))
|
||||
{
|
||||
if (!flood_water(x, y, i))
|
||||
if (flood_water(x, y, i))
|
||||
goto movedone;
|
||||
}
|
||||
// liquids and powders
|
||||
|
Loading…
Reference in New Issue
Block a user