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