From 7a10b30aecd4ffa6ff29434e56d3884fd284c108 Mon Sep 17 00:00:00 2001 From: darkrose Date: Wed, 17 Apr 2013 19:30:17 +1000 Subject: [PATCH] bugfix to leafdecay - dont decay near CONTENT_IGNORE --- src/environment.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/environment.cpp b/src/environment.cpp index 5bb597d..71020a4 100644 --- a/src/environment.cpp +++ b/src/environment.cpp @@ -1172,8 +1172,9 @@ void ServerEnvironment::step(float dtime) { test_p = leaf_p + v3s16(x,y,z); testnode = m_map->getNodeNoEx(test_p); - if (testnode.getContent() == CONTENT_TREE || - testnode.getContent() == CONTENT_JUNGLETREE) + if (testnode.getContent() == CONTENT_TREE + || testnode.getContent() == CONTENT_JUNGLETREE + || testnode.getContent() == CONTENT_IGNORE) { found = true; break; @@ -1207,7 +1208,8 @@ void ServerEnvironment::step(float dtime) for(s16 x=-max_d; !found && x<=max_d; x++) { test_p = apple_p + v3s16(x,y,z); testnode = m_map->getNodeNoEx(test_p); - if (testnode.getContent() == CONTENT_LEAVES) { + if (testnode.getContent() == CONTENT_LEAVES + || testnode.getContent() == CONTENT_IGNORE) { found = true; break; }