forked from VoxeLibre/VoxeLibre
Merge branch 'master' of https://git.minetest.land/epCode/MineClone2
This commit is contained in:
commit
c5169e48a1
|
@ -94,6 +94,9 @@ armor.def = {
|
||||||
}
|
}
|
||||||
|
|
||||||
armor.update_player_visuals = function(self, player)
|
armor.update_player_visuals = function(self, player)
|
||||||
|
if not player then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
local player_holding = player:get_wielded_item():get_name()
|
local player_holding = player:get_wielded_item():get_name()
|
||||||
if string.find(player_holding,"mcl_tools:") or player_holding == "mcl_mobitems:bone" or player_holding == "mcl_fishing:fishing_rod" then
|
if string.find(player_holding,"mcl_tools:") or player_holding == "mcl_mobitems:bone" or player_holding == "mcl_fishing:fishing_rod" then
|
||||||
|
@ -104,9 +107,6 @@ armor.update_player_visuals = function(self, player)
|
||||||
player:set_bone_position("Wield_Item", vector.new(-1.5,4.9,1.8), vector.new(135,0,90))
|
player:set_bone_position("Wield_Item", vector.new(-1.5,4.9,1.8), vector.new(135,0,90))
|
||||||
end
|
end
|
||||||
|
|
||||||
if not player then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
if self.textures[name] then
|
if self.textures[name] then
|
||||||
mcl_player.player_set_textures(player, {
|
mcl_player.player_set_textures(player, {
|
||||||
|
|
|
@ -31,10 +31,6 @@ mcl_player.player_register_model("character.b3d", {
|
||||||
sneak_mine = {x=346, y=366},
|
sneak_mine = {x=346, y=366},
|
||||||
sneak_walk = {x=304, y=323},
|
sneak_walk = {x=304, y=323},
|
||||||
sneak_walk_mine = {x=325, y=344},
|
sneak_walk_mine = {x=325, y=344},
|
||||||
swim_walk = {x=368, y=388},
|
|
||||||
swim_walk_mine = {x=389, y=409},
|
|
||||||
swim_stand = {x=434, y=434},
|
|
||||||
swim_mine = {x=411, y=430},
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -39,13 +39,6 @@ minetest.register_globalstep(function(dtime)
|
||||||
if player:get_properties().collisionbox ~= {-0.35,0,-0.35,0.35,1.35,0.35} then
|
if player:get_properties().collisionbox ~= {-0.35,0,-0.35,0.35,1.35,0.35} then
|
||||||
player:set_properties({collisionbox = {-0.35,0,-0.35,0.35,1.35,0.35}, eye_height = 1.35, nametag_color = { r = 255, b = 225, a = 0, g = 225 }})
|
player:set_properties({collisionbox = {-0.35,0,-0.35,0.35,1.35,0.35}, eye_height = 1.35, nametag_color = { r = 255, b = 225, a = 0, g = 225 }})
|
||||||
end
|
end
|
||||||
elseif minetest.get_item_group(mcl_playerinfo[name].node_stand, "water") ~= 0 then
|
|
||||||
-- controls head pitch when swiming
|
|
||||||
player:set_bone_position("Head", vector.new(0,6.3,0), vector.new(pitch+90,0,0))
|
|
||||||
-- sets collisionbox, eye height, and nametag color accordingly
|
|
||||||
if player:get_properties().collisionbox ~= {-0.35,0.2,-0.35,0.35,1.8,0.35} then
|
|
||||||
player:set_properties({collisionbox = {-0.35,0.2,-0.35,0.35,1.8,0.35}, eye_height = 1.65, nametag_color = { r = 255, b = 225, a = 225, g = 225 }})
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
-- controls head pitch when not sneaking
|
-- controls head pitch when not sneaking
|
||||||
player:set_bone_position("Head", vector.new(0,6.3,0), vector.new(pitch,0,0))
|
player:set_bone_position("Head", vector.new(0,6.3,0), vector.new(pitch,0,0))
|
||||||
|
|
Loading…
Reference in New Issue