Doors: Fix uninitialized state variable
authorDuane Robertson <duane@duanerobertson.com>
Sat, 21 May 2016 13:45:55 +0000 (08:45 -0500)
committerparamat <mat.gregory@virginmedia.com>
Mon, 23 May 2016 07:37:11 +0000 (08:37 +0100)
mods/doors/init.lua

index 90ddcc3d4bfe12c1bef1c76c6accd9034e4307a6..302eb08f5ceb99a47a2797b83ba40b73d95b2ef6 100644 (file)
@@ -140,6 +140,8 @@ function _doors.door_toggle(pos, clicker)
                -- fix up lvm-placed right-hinged doors, default closed
                if minetest.get_node(pos).name:sub(-2) == "_b" then
                        state = 2
+               else
+                       state = 0
                end
        else
                state = tonumber(state)