forked from VoxeLibre/VoxeLibre
Merge branch 'master' of https://git.minetest.land/MineClone2/MineClone2
This commit is contained in:
commit
53510ea32a
|
@ -451,6 +451,6 @@ mobs:spawn_specific("mobs_mc:donkey", mobs_mc.spawn.grassland_savanna, {"air"},
|
||||||
-- spawn eggs
|
-- spawn eggs
|
||||||
mobs:register_egg("mobs_mc:horse", S("Horse"), "mobs_mc_spawn_icon_horse.png", 0)
|
mobs:register_egg("mobs_mc:horse", S("Horse"), "mobs_mc_spawn_icon_horse.png", 0)
|
||||||
mobs:register_egg("mobs_mc:skeleton_horse", S("Skeleton Horse"), "mobs_mc_spawn_icon_horse_skeleton.png", 0)
|
mobs:register_egg("mobs_mc:skeleton_horse", S("Skeleton Horse"), "mobs_mc_spawn_icon_horse_skeleton.png", 0)
|
||||||
mobs:register_egg("mobs_mc:zombie_horse", S("Zombie Horse"), "mobs_mc_spawn_icon_horse_zombie.png", 0)
|
--mobs:register_egg("mobs_mc:zombie_horse", S("Zombie Horse"), "mobs_mc_spawn_icon_horse_zombie.png", 0)
|
||||||
mobs:register_egg("mobs_mc:donkey", S("Donkey"), "mobs_mc_spawn_icon_donkey.png", 0)
|
mobs:register_egg("mobs_mc:donkey", S("Donkey"), "mobs_mc_spawn_icon_donkey.png", 0)
|
||||||
mobs:register_egg("mobs_mc:mule", S("Mule"), "mobs_mc_spawn_icon_mule.png", 0)
|
mobs:register_egg("mobs_mc:mule", S("Mule"), "mobs_mc_spawn_icon_mule.png", 0)
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 11 KiB |
|
@ -37,6 +37,7 @@ S("Arrows might get stuck on solid blocks and can be retrieved again. They are a
|
||||||
|
|
||||||
local ARROW_ENTITY={
|
local ARROW_ENTITY={
|
||||||
physical = true,
|
physical = true,
|
||||||
|
pointable = false,
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "mcl_bows_arrow.obj",
|
mesh = "mcl_bows_arrow.obj",
|
||||||
visual_size = {x=-1, y=1},
|
visual_size = {x=-1, y=1},
|
||||||
|
|
|
@ -148,7 +148,7 @@ function mcl_buckets.register_liquid(def)
|
||||||
end,
|
end,
|
||||||
_on_dispense = function(stack, pos, droppos, dropnode, dropdir)
|
_on_dispense = function(stack, pos, droppos, dropnode, dropdir)
|
||||||
local iname = stack:get_name()
|
local iname = stack:get_name()
|
||||||
local buildable = minetest.registered_nodes[dropnode.name].buildable_to
|
local buildable = minetest.registered_nodes[dropnode.name].buildable_to or dropnode.name == "mcl_portals:portal"
|
||||||
|
|
||||||
if def.extra_check and def.extra_check(droppos, nil) == false then
|
if def.extra_check and def.extra_check(droppos, nil) == false then
|
||||||
-- Fail placement of liquid
|
-- Fail placement of liquid
|
||||||
|
@ -277,4 +277,4 @@ minetest.register_craftitem("mcl_buckets:bucket_empty", {
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
dofile(modpath.."/register.lua")
|
dofile(modpath.."/register.lua")
|
||||||
|
|
|
@ -6,6 +6,16 @@ mcl_player = {}
|
||||||
-- Note: This is currently broken due to a bug in Irrlicht, leave at 0
|
-- Note: This is currently broken due to a bug in Irrlicht, leave at 0
|
||||||
local animation_blend = 0
|
local animation_blend = 0
|
||||||
|
|
||||||
|
local function get_mouse_button(player)
|
||||||
|
local controls = player:get_player_control()
|
||||||
|
local get_wielded_item_name = player:get_wielded_item():get_name()
|
||||||
|
if controls.RMB and not string.find(player:get_wielded_item():get_name(), "mcl_bows:bow") or controls.LMB then
|
||||||
|
return true
|
||||||
|
else
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
mcl_player.registered_player_models = { }
|
mcl_player.registered_player_models = { }
|
||||||
|
|
||||||
-- Local for speed.
|
-- Local for speed.
|
||||||
|
@ -174,30 +184,30 @@ minetest.register_globalstep(function(dtime)
|
||||||
player_anim[name] = nil
|
player_anim[name] = nil
|
||||||
player_sneak[name] = controls.sneak
|
player_sneak[name] = controls.sneak
|
||||||
end
|
end
|
||||||
if controls.LMB and not controls.sneak and head_in_water and is_sprinting == true then
|
if get_mouse_button(player) == true and not controls.sneak and head_in_water and is_sprinting == true then
|
||||||
player_set_animation(player, "swim_walk_mine", animation_speed_mod)
|
player_set_animation(player, "swim_walk_mine", animation_speed_mod)
|
||||||
elseif not controls.sneak and head_in_water and is_sprinting == true then
|
elseif not controls.sneak and head_in_water and is_sprinting == true then
|
||||||
player_set_animation(player, "swim_walk", animation_speed_mod)
|
player_set_animation(player, "swim_walk", animation_speed_mod)
|
||||||
elseif is_sprinting == true and controls.LMB and not controls.sneak and not head_in_water then
|
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)
|
player_set_animation(player, "run_walk_mine", animation_speed_mod)
|
||||||
elseif controls.LMB and not controls.sneak then
|
elseif get_mouse_button(player) == true and not controls.sneak then
|
||||||
player_set_animation(player, "walk_mine", animation_speed_mod)
|
player_set_animation(player, "walk_mine", animation_speed_mod)
|
||||||
elseif controls.LMB and controls.sneak and is_sprinting ~= true then
|
elseif get_mouse_button(player) == true and controls.sneak and is_sprinting ~= true then
|
||||||
player_set_animation(player, "sneak_walk_mine", animation_speed_mod)
|
player_set_animation(player, "sneak_walk_mine", animation_speed_mod)
|
||||||
elseif is_sprinting == true and not controls.sneak and not head_in_water then
|
elseif is_sprinting == true and not controls.sneak and not head_in_water then
|
||||||
player_set_animation(player, "run_walk", animation_speed_mod)
|
player_set_animation(player, "run_walk", animation_speed_mod)
|
||||||
elseif controls.sneak and not controls.LMB then
|
elseif controls.sneak and not get_mouse_button(player) == true then
|
||||||
player_set_animation(player, "sneak_walk", animation_speed_mod)
|
player_set_animation(player, "sneak_walk", animation_speed_mod)
|
||||||
else
|
else
|
||||||
player_set_animation(player, "walk", animation_speed_mod)
|
player_set_animation(player, "walk", animation_speed_mod)
|
||||||
end
|
end
|
||||||
elseif controls.LMB and not controls.sneak and head_in_water and is_sprinting == true then
|
elseif get_mouse_button(player) == true and not controls.sneak and head_in_water and is_sprinting == true then
|
||||||
player_set_animation(player, "swim_mine")
|
player_set_animation(player, "swim_mine")
|
||||||
elseif not controls.LMB and not controls.sneak and head_in_water and is_sprinting == true then
|
elseif not get_mouse_button(player) == true and not controls.sneak and head_in_water and is_sprinting == true then
|
||||||
player_set_animation(player, "swim_stand")
|
player_set_animation(player, "swim_stand")
|
||||||
elseif controls.LMB and not controls.sneak then
|
elseif get_mouse_button(player) == true and not controls.sneak then
|
||||||
player_set_animation(player, "mine")
|
player_set_animation(player, "mine")
|
||||||
elseif controls.LMB and controls.sneak then
|
elseif get_mouse_button(player) == true and controls.sneak then
|
||||||
player_set_animation(player, "sneak_mine")
|
player_set_animation(player, "sneak_mine")
|
||||||
elseif not controls.sneak and head_in_water and is_sprinting == true then
|
elseif not controls.sneak and head_in_water and is_sprinting == true then
|
||||||
player_set_animation(player, "swim_stand", animation_speed_mod)
|
player_set_animation(player, "swim_stand", animation_speed_mod)
|
||||||
|
|
Loading…
Reference in New Issue