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;
if (seed > 7)
return;
MapNode n = env->getMap().getNodeNoEx(p0);
n.setContent(types[seed]);
n.param2 = 1;
MapNode n(types[seed]);
env->getMap().addNodeWithEvent(p0,n);
}