Page 1 of 1

Furnace fuels burning time

PostPosted: Wed Sep 07, 2011 22:28
by bcmpinc
Some of the fuels have a burning time of 0, due to the use of integer division. Example (from the file 'content_nodemeta.cpp'):
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
else if(ItemSpec(ITEM_MATERIAL, CONTENT_JUNGLEGRASS).checkItem(fuel_item))
{
    m_fuel_totaltime = 30/32;
    m_fuel_time = 0;
    fuel_list->decrementMaterials(1);
    changed = true;
}


I suppose it should be:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
    m_fuel_totaltime = 30.0f/32;