From a031a1548783f1dd4d6b357fef391647dfb35ce3 Mon Sep 17 00:00:00 2001
From: ShadowNinja <noreply@gmail.com>
Date: Sat, 20 Apr 2013 17:01:02 -0400
Subject: [PATCH] Don't predict placement of nodes if they would replace a non
 buildable_to node

---
 src/game.cpp | 2 ++
 1 file changed, 2 insertions(+)

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;
-- 
GitLab