From 8630b0a9260f185698b7cab4c2ea49f4c2658850 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Sun, 27 Dec 2015 21:28:57 -0500 Subject: [PATCH] change CRMC creation reaction from BREL + LAVA(CLST) to LAVA(QRTZ) + LAVA(CLST) BREL didn't make much sense, and this one is funner --- src/simulation/elements/BREC.cpp | 16 ---------------- src/simulation/elements/FIRE.cpp | 11 +++++++++++ 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/src/simulation/elements/BREC.cpp b/src/simulation/elements/BREC.cpp index 2df9761dc..f4e0b8424 100644 --- a/src/simulation/elements/BREC.cpp +++ b/src/simulation/elements/BREC.cpp @@ -60,22 +60,6 @@ int Element_BREC::update(UPDATE_FUNC_ARGS) } } - for (int rx = -1; rx <= 1; rx++) - for (int ry = -1; ry <= 1; ry++) - { - if (rx || ry) - { - int r = pmap[y+ry][x+rx]; - if (!r) - continue; - if ((r&0xFF) == PT_LAVA && parts[r>>8].ctype == PT_CLST) - { - float pres = std::max(sim->pv[y/CELL][x/CELL]*10.0f, 0.0f); - if (parts[r>>8].temp >= pres+sim->elements[PT_CRMC].HighTemperature+50.0f) - parts[r>>8].ctype = PT_CRMC; - } - } - } return 0; } diff --git a/src/simulation/elements/FIRE.cpp b/src/simulation/elements/FIRE.cpp index 644aea704..ef7cd586f 100644 --- a/src/simulation/elements/FIRE.cpp +++ b/src/simulation/elements/FIRE.cpp @@ -128,6 +128,17 @@ int Element_FIRE::update(UPDATE_FUNC_ARGS) } } + // LAVA(CLST) + LAVA(PQRT) + high enough temp = LAVA(CRMC) + LAVA(CRMC) + if (t == PT_LAVA && parts[i].ctype == PT_QRTZ && rt == PT_LAVA && parts[r>>8].ctype == PT_CLST) + { + float pres = std::max(sim->pv[y/CELL][x/CELL]*10.0f, 0.0f); + if (parts[i].temp >= pres+sim->elements[PT_CRMC].HighTemperature+50.0f) + { + parts[i].ctype = PT_CRMC; + parts[r>>8].ctype = PT_CRMC; + } + } + if ((surround_space || sim->elements[rt].Explosive) && sim->elements[rt].Flammable && (sim->elements[rt].Flammable + (int)(sim->pv[(y+ry)/CELL][(x+rx)/CELL] * 10.0f)) > (rand()%1000) && //exceptions, t is the thing causing the spark and rt is what's burning