Furnace fuels burning time

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

Furnace fuels burning time

by bcmpinc » Wed Sep 07, 2011 22:28

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;
Last edited by bcmpinc on Wed Sep 07, 2011 22:29, edited 1 time in total.
 

Return to Minetest Problems

Who is online

Users browsing this forum: No registered users and 5 guests