simplify fertilizer code a bit

This commit is contained in:
darkrose 2015-06-28 16:33:11 +10:00
parent a9e1e0c9bb
commit da1b9756c8
1 changed files with 1 additions and 3 deletions

View File

@ -412,9 +412,7 @@ void plantgrowth_fertilizer(ServerEnvironment *env, v3s16 p0)
u8 seed = myrand()%10; u8 seed = myrand()%10;
if (seed > 7) if (seed > 7)
return; return;
MapNode n = env->getMap().getNodeNoEx(p0); MapNode n(types[seed]);
n.setContent(types[seed]);
n.param2 = 1;
env->getMap().addNodeWithEvent(p0,n); env->getMap().addNodeWithEvent(p0,n);
} }