Fix "Node placement prediction failed for (places __default) - Name not known"
authorPerttu Ahola <celeron55@gmail.com>
Sat, 16 Jun 2012 19:45:35 +0000 (22:45 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Sat, 16 Jun 2012 19:45:35 +0000 (22:45 +0300)
src/scriptapi.cpp

index 3868d1035a9204ccc660ff266b50faf09f365ff1..35f00b7b51791e531116b0d15983f7d75ddc9118 100644 (file)
@@ -3976,8 +3976,11 @@ static int l_register_item_raw(lua_State *L)
 
        // Default to having client-side placement prediction for nodes
        // ("" in item definition sets it off)
-       if(def.type == ITEM_NODE && def.node_placement_prediction == "__default"){
-               def.node_placement_prediction = name;
+       if(def.node_placement_prediction == "__default"){
+               if(def.type == ITEM_NODE)
+                       def.node_placement_prediction = name;
+               else
+                       def.node_placement_prediction = "";
        }
        
        // Register item definition