]> git.lizzy.rs Git - minetest.git/commitdiff
Falling: Fix error caused by missing param2
authorSmallJoker <mk939@ymail.com>
Thu, 30 Jul 2020 17:03:48 +0000 (19:03 +0200)
committerSmallJoker <mk939@ymail.com>
Thu, 30 Jul 2020 17:03:48 +0000 (19:03 +0200)
Falling nodes that were spawned prior the recent falling node changes did not require param2.
Default to param2 = 0 when none is found in the node data.

builtin/game/falling.lua

index 714506a5f1b6892ddfb8cf40391ea6367c1f6ef6..4bfcca9e7747be4a0ed83ef96eec27f1ee1a705c 100644 (file)
@@ -52,6 +52,7 @@ core.register_entity(":__builtin:falling_node", {
        floats = false,
 
        set_node = function(self, node, meta)
+               node.param2 = node.param2 or 0
                self.node = node
                meta = meta or {}
                if type(meta.to_table) == "function" then