diff --git a/src/game.cpp b/src/game.cpp index f00e4c949..833117959 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -834,7 +834,7 @@ public: } }; -void nodePlacementPrediction(Client &client, +bool nodePlacementPrediction(Client &client, const ItemDefinition &playeritem_def, v3s16 nodepos, v3s16 neighbourpos) { @@ -854,7 +854,7 @@ void nodePlacementPrediction(Client &client, if(nodedef->get(n_under).buildable_to) p = nodepos; else if (!nodedef->get(map.getNode(p)).buildable_to) - return; + return false; }catch(InvalidPositionException &e){} // Find id of predicted node content_t id; @@ -864,7 +864,7 @@ void nodePlacementPrediction(Client &client, <get(map.getNode(pp)).walkable) - return; + return false; } // Add node to client map MapNode n(id, 0, param2); try{ // This triggers the required mesh update too client.addNode(p, n); + return true; }catch(InvalidPositionException &e){ errorstream<<"Node placement prediction failed for " <