aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-07-23 20:22:22 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-07-23 20:22:22 +0300
commit26582e0e664f313fbf7cb963a986e32fc4b23d60 (patch)
tree18b04edfd6d2f6d5d47ae0bba79fa83c9d62c79d /src
parent0b4cdfa02327d34df2c6d4d2982cf41762768ad1 (diff)
downloadminetest-26582e0e664f313fbf7cb963a986e32fc4b23d60.tar.gz
minetest-26582e0e664f313fbf7cb963a986e32fc4b23d60.tar.bz2
minetest-26582e0e664f313fbf7cb963a986e32fc4b23d60.zip
Fixed #21 Earth under torches oscillates between mud and grass
Diffstat (limited to 'src')
-rw-r--r--src/environment.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/environment.cpp b/src/environment.cpp
index f5e4b071a..d72369620 100644
--- a/src/environment.cpp
+++ b/src/environment.cpp
@@ -863,7 +863,7 @@ void ServerEnvironment::step(float dtime)
{
if(myrand()%20 == 0)
{
- MapNode n_top = block->getNodeNoEx(p0+v3s16(0,1,0));
+ MapNode n_top = m_map->getNodeNoEx(p+v3s16(0,1,0));
if(content_features(n_top).air_equivalent &&
n_top.getLightBlend(getDayNightRatio()) >= 13)
{
@@ -879,9 +879,8 @@ void ServerEnvironment::step(float dtime)
{
//if(myrand()%20 == 0)
{
- MapNode n_top = block->getNodeNoEx(p0+v3s16(0,1,0));
- if(n_top.getContent() != CONTENT_AIR
- && n_top.getContent() != CONTENT_IGNORE)
+ MapNode n_top = m_map->getNodeNoEx(p+v3s16(0,1,0));
+ if(content_features(n_top).air_equivalent == false)
{
n.setContent(CONTENT_MUD);
m_map->addNodeWithEvent(p, n);