aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJacobF <queatz@gmail.com>2011-09-02 17:33:06 -0400
committerJacobF <queatz@gmail.com>2011-09-02 17:33:06 -0400
commit2d872ce3fab0887f97adb4d57fc043e08f44d276 (patch)
tree9528f6e3aa3dcdf8a8b1473b43679b55b1bc260b /src
parent5e3b9e35781dea24484bd3c4b6a13017bef413ea (diff)
downloadminetest-2d872ce3fab0887f97adb4d57fc043e08f44d276.tar.gz
minetest-2d872ce3fab0887f97adb4d57fc043e08f44d276.tar.bz2
minetest-2d872ce3fab0887f97adb4d57fc043e08f44d276.zip
Furnace was crashing stuff again
Diffstat (limited to 'src')
-rw-r--r--src/content_nodemeta.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/content_nodemeta.cpp b/src/content_nodemeta.cpp
index 701812219..1552c8e15 100644
--- a/src/content_nodemeta.cpp
+++ b/src/content_nodemeta.cpp
@@ -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;
@@ -290,6 +290,11 @@ bool FurnaceNodeMetadata::step(float dtime)
}
/*
+ 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.
*/