TPT: Stop walls next to pipe triggering automatic pattern generation 76f49dd024

This commit is contained in:
Simon Robertshaw 2012-04-18 21:03:56 +01:00
parent d85049fb93
commit 2ce377ef43

View File

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