mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-09-12 00:56:53 +02:00
fix #1299
This commit is contained in:
parent
f894153b8a
commit
960b653979
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -25,6 +25,8 @@ mcl_player.player_register_model("mcl_armor_character.b3d", {
|
||||
sit_mount = {x=484, y=484},
|
||||
die = {x=498, y=498},
|
||||
fly = {x=502, y=581},
|
||||
bow_walk = {x=650, y=670},
|
||||
bow_sneak = {x=675, y=695},
|
||||
},
|
||||
})
|
||||
|
||||
@ -55,6 +57,8 @@ mcl_player.player_register_model("mcl_armor_character_female.b3d", {
|
||||
sit_mount = {x=484, y=484},
|
||||
die = {x=498, y=498},
|
||||
fly = {x=502, y=581},
|
||||
bow_walk = {x=650, y=670},
|
||||
bow_sneak = {x=675, y=695},
|
||||
},
|
||||
})
|
||||
|
||||
|
@ -212,6 +212,10 @@ minetest.register_globalstep(function(dtime)
|
||||
player_set_animation(player, "swim_walk_mine", animation_speed_mod)
|
||||
elseif not controls.sneak and head_in_water and is_sprinting == true then
|
||||
player_set_animation(player, "swim_walk", animation_speed_mod)
|
||||
elseif string.find(player:get_wielded_item():get_name(), "mcl_bows:bow") and controls.RMB and controls.sneak then
|
||||
player_set_animation(player, "bow_sneak", animation_speed_mod)
|
||||
elseif string.find(player:get_wielded_item():get_name(), "mcl_bows:bow") and controls.RMB then
|
||||
player_set_animation(player, "bow_walk", animation_speed_mod)
|
||||
elseif is_sprinting == true and get_mouse_button(player) == true and not controls.sneak and not head_in_water then
|
||||
player_set_animation(player, "run_walk_mine", animation_speed_mod)
|
||||
elseif get_mouse_button(player) == true and not controls.sneak then
|
||||
|
@ -51,6 +51,15 @@ local function player_collision(player)
|
||||
return {x,z}
|
||||
end
|
||||
|
||||
local function walking_player(player, control)
|
||||
if control.up or control.down or control.left or control.right then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- converts yaw to degrees
|
||||
local function degrees(rad)
|
||||
return rad * 180.0 / math.pi
|
||||
@ -217,8 +226,9 @@ minetest.register_globalstep(function(dtime)
|
||||
|
||||
player_velocity_old = player:get_velocity() or player:get_player_velocity()
|
||||
|
||||
|
||||
-- controls right and left arms pitch when shooting a bow
|
||||
if string.find(wielded:get_name(), "mcl_bows:bow") and control.RMB and not control.LMB and not control.up and not control.down and not control.left and not control.right then
|
||||
if string.find(wielded:get_name(), "mcl_bows:bow") and control.RMB 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 punching
|
||||
|
Loading…
Reference in New Issue
Block a user