diff --git a/README.md b/README.md index 25216b5..05e3e81 100644 --- a/README.md +++ b/README.md @@ -17,3 +17,5 @@ to your minetest.conf Servers can also control how often to verify the wield item of each individual player by setting `wield3d_update_time = 10` (seconds) + +The default wielditem scale can now be specified by including `wield3d_scale = 0.25` diff --git a/init.lua b/init.lua index d80f18c..ad4a5f6 100644 --- a/init.lua +++ b/init.lua @@ -28,20 +28,23 @@ wield3d = {} dofile(minetest.get_modpath(minetest.get_current_modname()).."/location.lua") +local player_wielding = {} local has_wieldview = minetest.get_modpath("wieldview") local update_time = minetest.settings:get("wield3d_update_time") local verify_time = minetest.settings:get("wield3d_verify_time") -local player_wielding = {} +local wield_scale = minetest.settings:get("wield3d_scale") + update_time = update_time and tonumber(update_time) or 1 verify_time = verify_time and tonumber(verify_time) or 10 +wield_scale = verify_time and tonumber(wield_scale) or 0.25 -- default scale + local location = { "Arm_Right", -- default bone {x=0, y=5.5, z=3}, -- default position {x=-90, y=225, z=90}, -- default rotation - {x=0.25, y=0.25}, -- default scale + {x=wield_scale, y=wield_scale}, } - local function add_wield_entity(player) if not player or not player:is_player() then return