diff --git a/src/simulation/elements/BANG.cpp b/src/simulation/elements/BANG.cpp index b0ff98399..8922e0ecc 100644 --- a/src/simulation/elements/BANG.cpp +++ b/src/simulation/elements/BANG.cpp @@ -102,6 +102,7 @@ int Element_BANG::update(UPDATE_FUNC_ARGS) else { sim->create_part(i, x, y, PT_SMKE); + parts[i].life = rand()%50+500; parts[i].temp = restrict_flt((MAX_TEMP/4)+otemp, MIN_TEMP, MAX_TEMP); } } diff --git a/src/simulation/elements/PLNT.cpp b/src/simulation/elements/PLNT.cpp index e7439d183..6e8202ca0 100644 --- a/src/simulation/elements/PLNT.cpp +++ b/src/simulation/elements/PLNT.cpp @@ -99,7 +99,7 @@ int Element_PLNT::update(UPDATE_FUNC_ARGS) } parts[i].life = 0; } - if (parts[i].temp > 400 && parts[i].temp > parts[i].tmp2) + if (parts[i].temp > 350 && parts[i].temp > parts[i].tmp2) parts[i].tmp2 = (int)parts[i].temp; return 0; } diff --git a/src/simulation/elements/VINE.cpp b/src/simulation/elements/VINE.cpp index 04c90bfd5..e31c8cd8e 100644 --- a/src/simulation/elements/VINE.cpp +++ b/src/simulation/elements/VINE.cpp @@ -64,6 +64,26 @@ int Element_VINE::update(UPDATE_FUNC_ARGS) sim->part_change_type(i,x,y,PT_PLNT); } } + if (parts[i].temp > 350 && parts[i].temp > parts[i].tmp2) + parts[i].tmp2 = (int)parts[i].temp; + return 0; +} + +//#TPT-Directive ElementHeader Element_VINE static int graphics(GRAPHICS_FUNC_ARGS) +int Element_VINE::graphics(GRAPHICS_FUNC_ARGS) +{ + float maxtemp = std::max((float)cpart->tmp2, cpart->temp); + if (maxtemp > 300) + { + *colr += (int)restrict_flt((maxtemp-300)/5,0,58); + *colg -= (int)restrict_flt((maxtemp-300)/2,0,102); + *colb += (int)restrict_flt((maxtemp-300)/5,0,70); + } + if (maxtemp < 273) + { + *colg += (int)restrict_flt((273-maxtemp)/4,0,255); + *colb += (int)restrict_flt((273-maxtemp)/1.5,0,255); + } return 0; } diff --git a/src/simulation/elements/WOOD.cpp b/src/simulation/elements/WOOD.cpp index 134d827ed..54e2e5075 100644 --- a/src/simulation/elements/WOOD.cpp +++ b/src/simulation/elements/WOOD.cpp @@ -55,7 +55,7 @@ int Element_WOOD::graphics(GRAPHICS_FUNC_ARGS) *colr -= (int)restrict_flt((maxtemp-400)/3,0,172); *colg -= (int)restrict_flt((maxtemp-400)/4,0,140); *colb -= (int)restrict_flt((maxtemp-400)/20,0,44); - if (maxtemp > 550) + if (maxtemp > 450) cpart->tmp = (int)maxtemp; } if (maxtemp < 273)