From 526e93204ad6622ed6319ece1c74ba96daf261ec Mon Sep 17 00:00:00 2001 From: jacksonmj Date: Tue, 30 Apr 2013 22:29:52 +0100 Subject: [PATCH 1/2] INST flood fill change so that vertical conduction is only prevented for 1px wire crossings. Needs thorough testing Fixes #129 , and prevents INST diodes when using a 2px vertical crossing a 1px horizontal. --- src/simulation/Simulation.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 7e076ad32..c738fce39 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++; From 2eaed9c9d478292f18d8a6aea9d2c9c869b26911 Mon Sep 17 00:00:00 2001 From: jacksonmj Date: Tue, 30 Apr 2013 23:10:07 +0100 Subject: [PATCH 2/2] Correct gold melting point --- src/simulation/elements/GOLD.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/simulation/elements/GOLD.cpp b/src/simulation/elements/GOLD.cpp index e3837d76e..00c93c598 100644 --- a/src/simulation/elements/GOLD.cpp +++ b/src/simulation/elements/GOLD.cpp @@ -40,7 +40,7 @@ Element_GOLD::Element_GOLD() HighPressureTransition = NT; LowTemperature = ITL; LowTemperatureTransition = NT; - HighTemperature = 1941.0f; + HighTemperature = 1337.0f; HighTemperatureTransition = PT_LAVA; Update = &Element_GOLD::update;