diff options
author | ShadowNinja <noreply@gmail.com> | 2013-04-20 17:01:02 -0400 |
---|---|---|
committer | PilzAdam <pilzadam@minetest.net> | 2013-05-03 17:03:25 +0200 |
commit | a031a1548783f1dd4d6b357fef391647dfb35ce3 (patch) | |
tree | aeb71fd0aef68e02478dd07eb9e972d476d0e5b2 /src | |
parent | 777ac58f85c74d2945886869e9b63b0f450ac3aa (diff) | |
download | minetest-a031a1548783f1dd4d6b357fef391647dfb35ce3.tar.gz minetest-a031a1548783f1dd4d6b357fef391647dfb35ce3.tar.bz2 minetest-a031a1548783f1dd4d6b357fef391647dfb35ce3.zip |
Don't predict placement of nodes if they would replace a non buildable_to node
Diffstat (limited to 'src')
-rw-r--r-- | src/game.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp index a5011b6ff..3fbfad801 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; |