diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 7843e293e..7a230212a 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -2493,6 +2493,19 @@ void Simulation::UpdateParticles(int start, int end) else t = PT_LAVA; } + else if (t == PT_RIME) + { + if (parts[i].tmp > 5) + { + t = PT_ACID; + parts[i].life = 25 + 5 * parts[i].tmp; + parts[i].tmp = 0; + } + else + { + t = PT_WATR; + } + } else s = 0; } @@ -2566,7 +2579,7 @@ void Simulation::UpdateParticles(int start, int end) { if (t==PT_ICEI || t==PT_LAVA || t==PT_SNOW) parts[i].ctype = parts[i].type; - if (!(t==PT_ICEI && parts[i].ctype==PT_FRZW)) + if (!(t==PT_ICEI && parts[i].ctype==PT_FRZW) && t!=PT_ACID) parts[i].life = 0; if (t == PT_FIRE) { diff --git a/src/simulation/elements/ACID.cpp b/src/simulation/elements/ACID.cpp index 72af0a315..6b65e54ed 100644 --- a/src/simulation/elements/ACID.cpp +++ b/src/simulation/elements/ACID.cpp @@ -82,7 +82,7 @@ static int update(UPDATE_FUNC_ARGS) sim->kill_part(ID(r)); } } - else if (rt != PT_CLNE && rt != PT_PCLN && parts[i].life > 50 && sim->rng.chance(elements[rt].Hardness, 1000)) + else if (rt != PT_CLNE && rt != PT_PCLN && ((rt != PT_FOG && rt != PT_RIME) || parts[ID(r)].tmp <= 5) && parts[i].life > 50 && sim->rng.chance(elements[rt].Hardness, 1000)) { if (sim->parts_avg(i, ID(r),PT_GLAS)!= PT_GLAS)//GLAS protects stuff from acid { diff --git a/src/simulation/elements/CAUS.cpp b/src/simulation/elements/CAUS.cpp index f4499c615..5664ad5d1 100644 --- a/src/simulation/elements/CAUS.cpp +++ b/src/simulation/elements/CAUS.cpp @@ -72,7 +72,7 @@ static int update(UPDATE_FUNC_ARGS) } else if (TYP(r) != PT_ACID && TYP(r) != PT_CAUS && TYP(r) != PT_RFRG && TYP(r) != PT_RFGL) { - if ((TYP(r) != PT_CLNE && TYP(r) != PT_PCLN && sim->rng.chance(elements[TYP(r)].Hardness, 1000)) && parts[i].life >= 50) + if ((TYP(r) != PT_CLNE && TYP(r) != PT_PCLN && ((TYP(r) != PT_FOG && TYP(r) != PT_RIME) || parts[ID(r)].tmp <= 5) && sim->rng.chance(elements[TYP(r)].Hardness, 1000)) && parts[i].life > 50) { // GLAS protects stuff from acid if (sim->parts_avg(i, ID(r),PT_GLAS) != PT_GLAS) diff --git a/src/simulation/elements/FOG.cpp b/src/simulation/elements/FOG.cpp index 830c0adfc..f5ffb3a97 100644 --- a/src/simulation/elements/FOG.cpp +++ b/src/simulation/elements/FOG.cpp @@ -67,6 +67,11 @@ static int update(UPDATE_FUNC_ARGS) { parts[i].life += sim->rng.between(0, 19); } + if (TYP(r) == PT_GAS && parts[i].tmp < 10) + { + sim->kill_part(ID(r)); + parts[i].tmp++; + } } } } diff --git a/src/simulation/elements/RIME.cpp b/src/simulation/elements/RIME.cpp index e59cb0a8d..71f50e488 100644 --- a/src/simulation/elements/RIME.cpp +++ b/src/simulation/elements/RIME.cpp @@ -41,7 +41,7 @@ void Element::Element_RIME() LowTemperature = ITL; LowTemperatureTransition = NT; HighTemperature = 273.15f; - HighTemperatureTransition = PT_WATR; + HighTemperatureTransition = ST; Update = &update; } @@ -62,6 +62,11 @@ static int update(UPDATE_FUNC_ARGS) sim->part_change_type(i,x,y,PT_FOG); parts[i].life = sim->rng.between(60, 119); } + else if (TYP(r) == PT_GAS && parts[i].tmp < 10) + { + sim->kill_part(ID(r)); + parts[i].tmp++; + } else if (TYP(r)==PT_FOG&&parts[ID(r)].life>0) { sim->part_change_type(i,x,y,PT_FOG);