Menu icon for sensors menu and fix for VIBR std::max args

This commit is contained in:
Simon Robertshaw 2012-10-26 15:58:39 +01:00
parent c3ba809806
commit 9b4f710e28
2 changed files with 4 additions and 4 deletions

View File

@ -150,7 +150,7 @@ menu_section * LoadMenus(int & menuCount)
{"\xC1", "Walls", 0, 1},
{"\xC2", "Electronics", 0, 1},
{"\xD6", "Powered Materials", 0, 1},
{"\xD6", "Sensors", 0, 1},
{"\x99", "Sensors", 0, 1},
{"\xE2", "Force", 0, 1},
{"\xC3", "Explosives", 0, 1},
{"\xC5", "Gasses", 0, 1},

View File

@ -193,9 +193,9 @@ int Element_VIBR::update(UPDATE_FUNC_ARGS) {
//#TPT-Directive ElementHeader Element_VIBR static int graphics(GRAPHICS_FUNC_ARGS)
int Element_VIBR::graphics(GRAPHICS_FUNC_ARGS)
{
float maxtemp = fmax(cpart->tmp,cpart->temp);
int gradient = max(cpart->ctype/12.0f, cpart->tmp);
gradient = max(gradient, cpart->tmp2);
float maxtemp = std::max((float)cpart->tmp, cpart->temp);
int gradient = std::max(cpart->ctype/12.0f, (float)cpart->tmp);
gradient = std::max(gradient, cpart->tmp2);
if (gradient >= 100 || cpart->life)
{
*pixel_mode = PMODE_NONE;