Skip to content

Commit

Permalink
Fire: Disable fire by default in multiplayer
Browse files Browse the repository at this point in the history
  • Loading branch information
Ezhh authored and paramat committed May 15, 2017
1 parent 63b3542 commit 758d501
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions mods/fire/init.lua
Expand Up @@ -292,9 +292,14 @@ minetest.register_abm({

local fire_enabled = minetest.setting_getbool("enable_fire")
if fire_enabled == nil then
-- New setting not specified, check for old setting.
-- If old setting is also not specified, 'not nil' is true.
fire_enabled = not minetest.setting_getbool("disable_fire")
-- enable_fire setting not specified, check for disable_fire
local fire_disabled = minetest.setting_getbool("disable_fire")
if fire_disabled == nil then
-- Neither setting specified, check whether singleplayer
fire_enabled = minetest.is_singleplayer()
else
fire_enabled = not fire_disabled
end
end

if not fire_enabled then
Expand Down

0 comments on commit 758d501

Please sign in to comment.