Stop walls next to pipe triggering automatic pattern generation

This commit is contained in:
jacksonmj 2012-04-10 17:26:14 +01:00
parent e4729d61d8
commit 76f49dd024

View File

@ -215,7 +215,7 @@ int update_PIPE(UPDATE_FUNC_ARGS) {
for (ry=-1; ry<2; ry++)
if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || ry))
{
if (!pmap[y+ry][x+rx])
if (!pmap[y+ry][x+rx] && bmap[(y+ry)/CELL][(x+rx)/CELL]!=WL_ALLOWAIR && bmap[(y+ry)/CELL][(x+rx)/CELL]!=WL_WALL && bmap[(y+ry)/CELL][(x+rx)/CELL]!=WL_WALLELEC && (bmap[(y+ry)/CELL][(x+rx)/CELL]!=WL_EWALL || emap[(y+ry)/CELL][(x+rx)/CELL]))
parts[i].life=50;
}
}