mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-03-27 17:43:05 +01:00
check to make sure flood fill doesn't crash when pmap is errored (?)
This commit is contained in:
parent
3e3fe1af73
commit
c4562ec73e
@ -535,7 +535,7 @@ sources+=Glob("generated/ToolClasses.cpp")
|
||||
|
||||
env.Decider('MD5')
|
||||
|
||||
# set a defaukt target
|
||||
# set a default target
|
||||
|
||||
t=env.Program(target=programName, source=sources)
|
||||
Default(t)
|
||||
|
@ -1479,11 +1479,14 @@ int Simulation::FloodParts(int x, int y, int fullc, int cm, int flags)
|
||||
}
|
||||
x2++;
|
||||
}
|
||||
// fill span
|
||||
for (x=x1; x<=x2; x++)
|
||||
if (FloodFillPmapCheck(x2+1, y, cm))
|
||||
{
|
||||
if (CreateParts(x, y, 0, 0, fullc, flags))
|
||||
created_something = 1;
|
||||
// fill span
|
||||
for (x=x1; x<=x2; x++)
|
||||
{
|
||||
if (CreateParts(x, y, 0, 0, fullc, flags))
|
||||
created_something = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (c?y>=CELL+dy:y>=dy)
|
||||
|
Loading…
x
Reference in New Issue
Block a user