Fix endless trapdoor bug.
authorAuke Kok <sofar@foo-projects.org>
Tue, 5 Jan 2016 15:16:42 +0000 (07:16 -0800)
committerparamat <mat.gregory@virginmedia.com>
Tue, 5 Jan 2016 23:29:24 +0000 (23:29 +0000)
Closes #770 - thanks to @tenplus1, @kilbith

mods/doors/init.lua

index eaf4986f7c58cf2b883e8b758c8455fb27f2c9a1..c3896d958c0a540bb124014b63b0188dac4f7de8 100644 (file)
@@ -467,10 +467,7 @@ function doors.register_trapdoor(name, def)
                        meta:set_string("doors_owner", pn)
                        meta:set_string("infotext", "Owned by "..pn)
 
-                       if not minetest.setting_getbool("creative_mode") then
-                               return true
-                       end
-                       return false
+                       return minetest.setting_getbool("creative_mode")
                end
        end