mirror of
https://github.com/stujones11/wield3d.git
synced 2024-12-27 00:07:28 +01:00
Remove redundant 3d model and tweak attachment positions
This commit is contained in:
parent
5e3092ca60
commit
b0a20fbcf3
17
init.lua
17
init.lua
@ -13,7 +13,7 @@ dofile(modpath.."/location.lua")
|
||||
|
||||
local location = {
|
||||
"Arm_Right", -- default bone
|
||||
{x=0.2, y=5.5, z=3}, -- default position
|
||||
{x=0.2, y=6.5, z=3}, -- default position
|
||||
{x=-100, y=225, z=90}, -- default rotation
|
||||
}
|
||||
local player_wielding = {}
|
||||
@ -81,7 +81,6 @@ minetest.register_entity("wield3d:wield_entity", {
|
||||
if loc[1] ~= self.location[1]
|
||||
or vector.equals(loc[2], self.location[2]) == false
|
||||
or vector.equals(loc[3], self.location[3]) == false then
|
||||
self.object:setpos(p2)
|
||||
self.object:set_detach()
|
||||
self.object:set_attach(player, loc[1], loc[2], loc[3])
|
||||
self.location = {loc[1], loc[2], loc[3]}
|
||||
@ -121,21 +120,7 @@ minetest.register_on_leaveplayer(function(player)
|
||||
end)
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
default.player_set_model(player, "wield3d_character.b3d")
|
||||
player_wielding[player:get_player_name()] = 0
|
||||
minetest.after(WIELD3D_INIT_DELAY, add_wield_entity, player)
|
||||
end)
|
||||
|
||||
default.player_register_model("wield3d_character.b3d", {
|
||||
animation_speed = 30,
|
||||
textures = {"character.png"},
|
||||
animations = {
|
||||
stand = {x=0, y=79},
|
||||
lay = {x=162, y=166},
|
||||
walk = {x=168, y=187},
|
||||
mine = {x=189, y=198},
|
||||
walk_mine = {x=200, y=219},
|
||||
sit = {x=81, y=160},
|
||||
},
|
||||
})
|
||||
|
||||
|
50
location.lua
50
location.lua
@ -3,30 +3,30 @@
|
||||
local bone = "Arm_Right"
|
||||
|
||||
wield3d_location = {
|
||||
["default:torch"] = {bone, {x=0.2, y=5.5, z=3}, {x=-100, y=182, z=83}},
|
||||
["default:sapling"] = {bone, {x=0.2, y=5.5, z=3}, {x=-100, y=182, z=83}},
|
||||
["flowers:dandelion_white"] = {bone, {x=0.2, y=5.5, z=3}, {x=-100, y=182, z=83}},
|
||||
["flowers:dandelion_yellow"] = {bone, {x=0.2, y=5.5, z=3}, {x=-100, y=182, z=83}},
|
||||
["flowers:geranium"] = {bone, {x=0.2, y=5.5, z=3}, {x=-100, y=182, z=83}},
|
||||
["flowers:rose"] = {bone, {x=0.2, y=5.5, z=3}, {x=-100, y=182, z=83}},
|
||||
["flowers:tulip"] = {bone, {x=0.2, y=5.5, z=3}, {x=-100, y=182, z=83}},
|
||||
["flowers:viola"] = {bone, {x=0.2, y=5.5, z=3}, {x=-100, y=182, z=83}},
|
||||
["default:shovel_wood"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["default:shovel_stone"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["default:shovel_steel"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["default:shovel_bronze"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["default:shovel_mese"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["default:shovel_diamond"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["bucket:bucket_empty"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["bucket:bucket_water"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["bucket:bucket_lava"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["screwdriver:screwdriver"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["screwdriver:screwdriver1"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["screwdriver:screwdriver2"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["screwdriver:screwdriver3"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["screwdriver:screwdriver4"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["vessels:glass_bottle"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["vessels:drinking_glass"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["vessels:steel_bottle"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["default:torch"] = {bone, {x=0.2, y=6.5, z=3}, {x=-100, y=182, z=83}},
|
||||
["default:sapling"] = {bone, {x=0.2, y=6.5, z=3}, {x=-100, y=182, z=83}},
|
||||
["flowers:dandelion_white"] = {bone, {x=0.2, y=6.5, z=3}, {x=-100, y=182, z=83}},
|
||||
["flowers:dandelion_yellow"] = {bone, {x=0.2, y=6.5, z=3}, {x=-100, y=182, z=83}},
|
||||
["flowers:geranium"] = {bone, {x=0.2, y=6.5, z=3}, {x=-100, y=182, z=83}},
|
||||
["flowers:rose"] = {bone, {x=0.2, y=6.5, z=3}, {x=-100, y=182, z=83}},
|
||||
["flowers:tulip"] = {bone, {x=0.2, y=6.5, z=3}, {x=-100, y=182, z=83}},
|
||||
["flowers:viola"] = {bone, {x=0.2, y=6.5, z=3}, {x=-100, y=182, z=83}},
|
||||
["default:shovel_wood"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["default:shovel_stone"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["default:shovel_steel"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["default:shovel_bronze"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["default:shovel_mese"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["default:shovel_diamond"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["bucket:bucket_empty"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["bucket:bucket_water"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["bucket:bucket_lava"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["screwdriver:screwdriver"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["screwdriver:screwdriver1"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["screwdriver:screwdriver2"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["screwdriver:screwdriver3"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["screwdriver:screwdriver4"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["vessels:glass_bottle"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["vessels:drinking_glass"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}},
|
||||
["vessels:steel_bottle"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}},
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user