aboutsummaryrefslogtreecommitdiff
path: root/src/content_abm.cpp
diff options
context:
space:
mode:
authorWeblate <42@minetest.ru>2013-05-01 15:33:15 +0200
committerWeblate <42@minetest.ru>2013-05-01 15:33:15 +0200
commit97cddd1b960e3b60ce74ff9ad16307b39676144e (patch)
tree0547ab284acc0fdf8aad2a36643be6f78f786ef1 /src/content_abm.cpp
parentf1f2004cb9efb026625b192b404064c26ceb6d5f (diff)
parent898a4e441fc0245aaf4821ff5e3dad0daccda3b5 (diff)
downloadminetest-97cddd1b960e3b60ce74ff9ad16307b39676144e.tar.gz
minetest-97cddd1b960e3b60ce74ff9ad16307b39676144e.tar.bz2
minetest-97cddd1b960e3b60ce74ff9ad16307b39676144e.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src/content_abm.cpp')
-rw-r--r--src/content_abm.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/content_abm.cpp b/src/content_abm.cpp
index ccd9ca19c..e20201dcf 100644
--- a/src/content_abm.cpp
+++ b/src/content_abm.cpp
@@ -51,11 +51,15 @@ public:
ServerMap *map = &env->getServerMap();
MapNode n_top = map->getNodeNoEx(p+v3s16(0,1,0));
+ content_t c_snow = ndef->getId("snow");
if(ndef->get(n_top).light_propagates &&
!ndef->get(n_top).isLiquid() &&
n_top.getLightBlend(env->getDayNightRatio(), ndef) >= 13)
{
- n.setContent(ndef->getId("mapgen_dirt_with_grass"));
+ if(c_snow != CONTENT_IGNORE && n_top.getContent() == c_snow)
+ n.setContent(ndef->getId("dirt_with_snow"));
+ else
+ n.setContent(ndef->getId("mapgen_dirt_with_grass"));
map->addNodeWithEvent(p, n);
}
}