mirror of
https://github.com/stujones11/wield3d.git
synced 2024-12-27 00:07:28 +01:00
Make default wielditem scale a config option
This commit is contained in:
parent
a11586e718
commit
300f1bfe0d
@ -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`
|
||||
|
9
init.lua
9
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
|
||||
|
Loading…
Reference in New Issue
Block a user