VINE cool/burn effects like in PLNT, less sharp burn lines, fix infinite smoke from TNT
This commit is contained in:
parent
9e72a619ab
commit
7a21ae192f
@ -102,6 +102,7 @@ int Element_BANG::update(UPDATE_FUNC_ARGS)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
sim->create_part(i, x, y, PT_SMKE);
|
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);
|
parts[i].temp = restrict_flt((MAX_TEMP/4)+otemp, MIN_TEMP, MAX_TEMP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@ int Element_PLNT::update(UPDATE_FUNC_ARGS)
|
|||||||
}
|
}
|
||||||
parts[i].life = 0;
|
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;
|
parts[i].tmp2 = (int)parts[i].temp;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -64,6 +64,26 @@ int Element_VINE::update(UPDATE_FUNC_ARGS)
|
|||||||
sim->part_change_type(i,x,y,PT_PLNT);
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ int Element_WOOD::graphics(GRAPHICS_FUNC_ARGS)
|
|||||||
*colr -= (int)restrict_flt((maxtemp-400)/3,0,172);
|
*colr -= (int)restrict_flt((maxtemp-400)/3,0,172);
|
||||||
*colg -= (int)restrict_flt((maxtemp-400)/4,0,140);
|
*colg -= (int)restrict_flt((maxtemp-400)/4,0,140);
|
||||||
*colb -= (int)restrict_flt((maxtemp-400)/20,0,44);
|
*colb -= (int)restrict_flt((maxtemp-400)/20,0,44);
|
||||||
if (maxtemp > 550)
|
if (maxtemp > 450)
|
||||||
cpart->tmp = (int)maxtemp;
|
cpart->tmp = (int)maxtemp;
|
||||||
}
|
}
|
||||||
if (maxtemp < 273)
|
if (maxtemp < 273)
|
||||||
|
Loading…
Reference in New Issue
Block a user