check to make sure flood fill doesn't crash when pmap is errored (?)

This commit is contained in:
jacob1 2013-12-29 11:03:55 -05:00
parent 3e3fe1af73
commit c4562ec73e
2 changed files with 8 additions and 5 deletions

View File

@ -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)

View File

@ -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)