Skip to content
Snippets Groups Projects
Commit 2d872ce3 authored by JacobF's avatar JacobF
Browse files

Furnace was crashing stuff again

parent 5e3b9e35
No related branches found
No related tags found
No related merge requests found
......@@ -245,7 +245,7 @@ bool FurnaceNodeMetadata::step(float dtime)
InventoryList *src_list = m_inventory->getList("src");
assert(src_list);
const InventoryItem *src_item = src_list->getItem(0);
InventoryItem *src_item = src_list->getItem(0);
bool room_available = false;
......@@ -289,6 +289,11 @@ bool FurnaceNodeMetadata::step(float dtime)
continue;
}
/*
Get the source again in case it has all burned
*/
src_item = src_list->getItem(0);
/*
If there is no source item, or the source item is not cookable,
or the furnace is still cooking, or the furnace became overloaded, stop loop.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment