Skip to content
Snippets Groups Projects
Commit 26582e0e authored by Perttu Ahola's avatar Perttu Ahola
Browse files

Fixed #21 Earth under torches oscillates between mud and grass

parent 0b4cdfa0
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
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