From: ShadowNinja Date: Sat, 20 Apr 2013 21:01:02 +0000 (-0400) Subject: Don't predict placement of nodes if they would replace a non buildable_to node X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=a031a1548783f1dd4d6b357fef391647dfb35ce3;p=zefram%2Fminetest%2Fminetest_engine.git Don't predict placement of nodes if they would replace a non buildable_to node --- diff --git a/src/game.cpp b/src/game.cpp index a5011b6f..3fbfad80 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -808,6 +808,8 @@ void nodePlacementPrediction(Client &client, MapNode n_under = map.getNode(nodepos); if(nodedef->get(n_under).buildable_to) p = nodepos; + else if (!nodedef->get(map.getNode(p)).buildable_to) + return; }catch(InvalidPositionException &e){} // Find id of predicted node content_t id;