forked from VoxeLibre/VoxeLibre
Make branch mergeable.
This commit is contained in:
parent
883cb72089
commit
c4f854e160
|
@ -109,24 +109,10 @@ minetest.register_globalstep(function(dtime)
|
|||
player_vel_yaw = limit_vel_yaw(player_vel_yaw, yaw)
|
||||
player_vel_yaws[name] = player_vel_yaw
|
||||
|
||||
if string.find(player:get_wielded_item():get_name(), "mcl_bows:crossbow") and controls.RMB then
|
||||
playerphysics.add_physics_factor(player, "speed", "mcl_playerplus:crossbow_walking", tonumber(minetest.settings:get("movement_speed_crouch")) / tonumber(minetest.settings:get("movement_speed_walk")))
|
||||
else
|
||||
playerphysics.remove_physics_factor(player, "speed", "mcl_playerplus:crossbow_walking")
|
||||
end
|
||||
|
||||
-- controls right and left arms pitch when shooting a bow
|
||||
if string.find(wielded:get_name(), "mcl_bows:bow") and controls.RMB and not controls.LMB and not controls.up and not controls.down and not controls.left and not controls.right then
|
||||
player:set_bone_position("Arm_Right_Pitch_Control", vector.new(-3,5.785,0), vector.new(pitch+90,-30,pitch * -1 * .35))
|
||||
player:set_bone_position("Arm_Left_Pitch_Control", vector.new(3.5,5.785,0), vector.new(pitch+90,43,pitch * .35))
|
||||
-- when holdong loading crossbow
|
||||
elseif string.find(player:get_wielded_item():get_name(), "mcl_bows:crossbow") and not controls.LMB and controls.RMB and not controls.up and not controls.down and not controls.left and not controls.right and not minetest.get_item_group(mcl_playerinfo[name].node_stand, "water") ~= 0 then
|
||||
player:set_bone_position("Arm_Right_Pitch_Control", vector.new(-3,5.785,0), vector.new(20,0,30))
|
||||
player:set_bone_position("Arm_Left_Pitch_Control", vector.new(3,5.785,0), vector.new(40,0,-40))
|
||||
-- when holdong loaded crossbow
|
||||
elseif string.find(player:get_wielded_item():get_name(), "mcl_bows:loaded_crossbow") and not controls.LMB and not controls.up and not controls.down and not controls.left and not controls.right and not minetest.get_item_group(mcl_playerinfo[name].node_stand, "water") ~= 0 then
|
||||
player:set_bone_position("Arm_Right_Pitch_Control", vector.new(-3,5.785,0), vector.new(pitch+90,-15,pitch * -1 * .35))
|
||||
player:set_bone_position("Arm_Left_Pitch_Control", vector.new(3.5,5.785,0), vector.new(pitch+90,55,pitch * .35))
|
||||
-- when punching
|
||||
elseif controls.LMB and player:get_attach() == nil then
|
||||
player:set_bone_position("Arm_Right_Pitch_Control", vector.new(-3,5.785,0), vector.new(pitch,0,0))
|
||||
|
@ -417,4 +403,4 @@ minetest.register_on_leaveplayer(function(player)
|
|||
local name = player:get_player_name()
|
||||
|
||||
mcl_playerplus_internal[name] = nil
|
||||
end)
|
||||
end)
|
Loading…
Reference in New Issue