diff options
| author | mmbob <mmbob+github@outlook.com> | 2013-05-01 01:54:09 (GMT) |
|---|---|---|
| committer | mmbob <mmbob+github@outlook.com> | 2013-05-01 01:54:09 (GMT) |
| commit | 7bc321b17681c7633a6227129adb6dd593c190a2 (patch) | |
| tree | 6ab08c764693508e57c6b1ca76893c99cda7e6fb /src/simulation/Simulation.cpp | |
| parent | 9d4cbd3112a6a21858054deebc76b6bf30eec6df (diff) | |
| parent | 2eaed9c9d478292f18d8a6aea9d2c9c869b26911 (diff) | |
| download | powder-7bc321b17681c7633a6227129adb6dd593c190a2.zip powder-7bc321b17681c7633a6227129adb6dd593c190a2.tar.gz | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/simulation/Simulation.cpp')
| -rw-r--r-- | src/simulation/Simulation.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 7e076ad..c738fce 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -602,9 +602,9 @@ int Simulation::FloodINST(int x, int y, int fullc, int cm) { if ((pmap[y-1][x]&0xFF)==cm && !parts[pmap[y-1][x]>>8].life) { - if (x==x1 || x==x2 || y>=YRES-CELL-1 || !PMAP_CMP_CONDUCTIVE(pmap[y+1][x], cm)) + if (x==x1 || x==x2 || y>=YRES-CELL-1 || !PMAP_CMP_CONDUCTIVE(pmap[y+1][x], cm) || PMAP_CMP_CONDUCTIVE(pmap[y+1][x+1], cm) || PMAP_CMP_CONDUCTIVE(pmap[y+1][x-1], cm)) { - // if at the end of a horizontal section, or if it's a T junction + // if at the end of a horizontal section, or if it's a T junction or not a 1px wire crossing coord_stack[coord_stack_size][0] = x; coord_stack[coord_stack_size][1] = y-1; coord_stack_size++; @@ -641,9 +641,9 @@ int Simulation::FloodINST(int x, int y, int fullc, int cm) { if ((pmap[y+1][x]&0xFF)==cm && !parts[pmap[y+1][x]>>8].life) { - if (x==x1 || x==x2 || y<0 || !PMAP_CMP_CONDUCTIVE(pmap[y-1][x], cm)) + if (x==x1 || x==x2 || y<0 || !PMAP_CMP_CONDUCTIVE(pmap[y-1][x], cm) || PMAP_CMP_CONDUCTIVE(pmap[y-1][x+1], cm) || PMAP_CMP_CONDUCTIVE(pmap[y-1][x-1], cm)) { - // if at the end of a horizontal section, or if it's a T junction + // if at the end of a horizontal section, or if it's a T junction or not a 1px wire crossing coord_stack[coord_stack_size][0] = x; coord_stack[coord_stack_size][1] = y+1; coord_stack_size++; |
