Fix TNT init for undefined enable_tnt setting
authorGabriel Huber <huberg18@gmail.com>
Fri, 25 Jul 2014 17:12:01 +0000 (19:12 +0200)
committerShadowNinja <shadowninja@minetest.net>
Sat, 26 Jul 2014 03:29:44 +0000 (23:29 -0400)
mods/tnt/init.lua

index 1182acaed246d81364b785e34e6b057ffcb6fac2..a2e5adaa87b3a435316134f91f4ccbfeee0bc826 100644 (file)
@@ -2,8 +2,8 @@
 -- Default to enabled in singleplayer and disabled in multiplayer
 local singleplayer = minetest.is_singleplayer()
 local setting = minetest.setting_getbool("enable_tnt")
-if (not singleplayer and setting ~= false) or
-               (singleplayer and setting ~= true) then
+if (not singleplayer and setting ~= true) or
+               (singleplayer and setting == false) then
        return
 end