Skip to content

Commit

Permalink
Furnace was crashing stuff again
Browse files Browse the repository at this point in the history
  • Loading branch information
Queatz committed Sep 2, 2011
1 parent 5e3b9e3 commit 2d872ce
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/content_nodemeta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 2d872ce

Please sign in to comment.