cap snow at 200, no snow in space

This commit is contained in:
darkrose 2013-11-17 12:10:35 +10:00
parent bcd316bab0
commit 75b30c024d
1 changed files with 4 additions and 4 deletions

View File

@ -963,7 +963,7 @@ void ServerEnvironment::step(float dtime)
if (myrand()%20 == 0) { if (myrand()%20 == 0) {
MapNode n_top = m_map->getNodeNoEx(p+v3s16(0,1,0)); MapNode n_top = m_map->getNodeNoEx(p+v3s16(0,1,0));
if (content_features(n_top).air_equivalent) { if (content_features(n_top).air_equivalent) {
if (p.Y > 50) { if (p.Y > 50 && p.Y < 200) {
n.setContent(CONTENT_MUDSNOW); n.setContent(CONTENT_MUDSNOW);
m_map->addNodeWithEvent(p, n); m_map->addNodeWithEvent(p, n);
}else if (n_top.getLightBlend(getDayNightRatio()) >= 13) { }else if (n_top.getLightBlend(getDayNightRatio()) >= 13) {
@ -976,14 +976,14 @@ void ServerEnvironment::step(float dtime)
if (myrand()%20 == 0) { if (myrand()%20 == 0) {
MapNode n_top = m_map->getNodeNoEx(p+v3s16(0,1,0)); MapNode n_top = m_map->getNodeNoEx(p+v3s16(0,1,0));
if (content_features(n_top).air_equivalent) { if (content_features(n_top).air_equivalent) {
if (p.Y > 50) { if (p.Y > 50 && p.Y < 200) {
n.setContent(CONTENT_MUDSNOW); n.setContent(CONTENT_MUDSNOW);
m_map->addNodeWithEvent(p, n); m_map->addNodeWithEvent(p, n);
} }
} }
} }
}else if ( }else if (
p.Y > 55 p.Y > 55 && p.Y < 200
&& ( && (
content_features(n).draw_type == CDT_CUBELIKE content_features(n).draw_type == CDT_CUBELIKE
|| content_features(n).draw_type == CDT_GLASSLIKE || content_features(n).draw_type == CDT_GLASSLIKE
@ -1000,7 +1000,7 @@ void ServerEnvironment::step(float dtime)
} }
} }
if (n.getContent() == CONTENT_WATERSOURCE || n.getContent() == CONTENT_WATER) { if (n.getContent() == CONTENT_WATERSOURCE || n.getContent() == CONTENT_WATER) {
if (p.Y > 60) { if (p.Y > 60 && p.Y < 200) {
n.setContent(CONTENT_ICE); n.setContent(CONTENT_ICE);
m_map->addNodeWithEvent(p, n); m_map->addNodeWithEvent(p, n);
} }