Furnace fuels burning time

Post Reply
bcmpinc
Member
Posts: 30
Joined: Fri Jun 17, 2011 09:10

Furnace fuels burning time

by bcmpinc » Post

Some of the fuels have a burning time of 0, due to the use of integer division. Example (from the file 'content_nodemeta.cpp'):

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:

Code: Select all

    m_fuel_totaltime = 30.0f/32;
Last edited by bcmpinc on Wed Sep 07, 2011 22:29, edited 1 time in total.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests