diff options
Diffstat (limited to 'src/simulation/elements/BCLN.cpp')
| -rw-r--r-- | src/simulation/elements/BCLN.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/simulation/elements/BCLN.cpp b/src/simulation/elements/BCLN.cpp index 3db0654..281ecb2 100644 --- a/src/simulation/elements/BCLN.cpp +++ b/src/simulation/elements/BCLN.cpp @@ -71,21 +71,29 @@ int Element_BCLN::update(UPDATE_FUNC_ARGS) continue; if ((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && (r&0xFF)!=PT_BCLN && (r&0xFF)!=PT_STKM && - (r&0xFF)!=PT_STKM2 && (r&0xFF)!=PT_PBCN && + (r&0xFF)!=PT_PBCN && (r&0xFF)!=PT_STKM2 && (r&0xFF)<PT_NUM) { parts[i].ctype = r&0xFF; - if ((r&0xFF)==PT_LIFE) + if ((r&0xFF)==PT_LIFE || (r&0xFF)==PT_LAVA) parts[i].tmp = parts[r>>8].ctype; } } } else { if (parts[i].ctype==PT_LIFE) sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype|(parts[i].tmp<<8)); - else sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); + else + { + int np = sim->create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); + if (np>=0) + { + if (parts[i].ctype==PT_LAVA && parts[i].tmp>0 && parts[i].tmp<PT_NUM && sim->elements[parts[i].tmp].HighTemperatureTransition==PT_LAVA) + parts[np].ctype = parts[i].tmp; + } + } } return 0; } -Element_BCLN::~Element_BCLN() {}
\ No newline at end of file +Element_BCLN::~Element_BCLN() {} |
