Merge branch 'master' of https://git.minetest.land/MineClone2/MineClone2
This commit is contained in:
commit
81167b4431
|
@ -751,10 +751,10 @@ local check_for_death = function(self, cause, cmi_cause)
|
|||
|
||||
-- play damage sound if health was reduced and make mob flash red.
|
||||
if damaged then
|
||||
add_texture_mod(self, "^[colorize:#FF000040")
|
||||
add_texture_mod(self, "^[colorize:red:130")
|
||||
minetest.after(.2, function(self)
|
||||
if self and self.object then
|
||||
remove_texture_mod(self, "^[colorize:#FF000040")
|
||||
remove_texture_mod(self, "^[colorize:red:130")
|
||||
end
|
||||
end, self)
|
||||
mob_sound(self, "damage")
|
||||
|
|
|
@ -60,10 +60,9 @@ function mcl_flowers.register_simple_flower(name, def)
|
|||
if not def.drop then def.drop = newname end
|
||||
mcl_flowers.registered_simple_flowers[newname] = {
|
||||
name=name,
|
||||
desc=def.desc,
|
||||
pot_desc=def.pot_desc,
|
||||
image=def.image,
|
||||
selection_box=def.selection_box,
|
||||
desc=desc,
|
||||
image=image,
|
||||
simple_selection_box=simple_selection_box,
|
||||
}
|
||||
minetest.register_node(newname, {
|
||||
description = def.desc,
|
||||
|
|
|
@ -590,23 +590,36 @@ function mcl_potions.make_invisible(player, toggle)
|
|||
|
||||
local is_player = player:is_player()
|
||||
local entity = player:get_luaentity()
|
||||
local playername = player:get_player_name()
|
||||
local skin_file = ""
|
||||
|
||||
if toggle then -- hide player
|
||||
|
||||
if player:is_player() then
|
||||
EF.invisible[player].old_size = player:get_properties().visual_size
|
||||
elseif entity then
|
||||
skin_file = "mobs_mc_empty.png"
|
||||
|
||||
if entity then
|
||||
EF.invisible[player].old_size = entity.visual_size
|
||||
else -- if not a player or entity, do nothing
|
||||
elseif not player:is_player() then -- if not a player or entity, do nothing
|
||||
return
|
||||
end
|
||||
|
||||
player:set_properties({visual_size = {x = 0, y = 0}})
|
||||
if minetest.get_modpath("mcl_armor") and player:is_player() then
|
||||
armor.textures[playername].skin = skin_file
|
||||
armor:update_player_visuals(player)
|
||||
elseif not player:is_player() and minetest.get_modpath("mcl_armor") or not player:is_player() and not minetest.get_modpath("mcl_armor") then
|
||||
player:set_properties({visual_size = {x = 0, y = 0}})
|
||||
end
|
||||
player:set_nametag_attributes({color = {a = 0}})
|
||||
|
||||
elseif EF.invisible[player] then -- show player
|
||||
|
||||
player:set_properties({visual_size = EF.invisible[player].old_size})
|
||||
if minetest.get_modpath("mcl_armor") and player:is_player() then
|
||||
skin_file = mcl_skins.skins[playername] .. ".png"
|
||||
armor.textures[playername].skin = skin_file
|
||||
armor:update_player_visuals(player)
|
||||
elseif not player:is_player() and minetest.get_modpath("mcl_armor") or not player:is_player() and not minetest.get_modpath("mcl_armor") then
|
||||
player:set_properties({visual_size = EF.invisible[player].old_size})
|
||||
end
|
||||
player:set_nametag_attributes({color = {r = 255, g = 255, b = 255, a = 255}})
|
||||
|
||||
end
|
||||
|
@ -999,4 +1012,3 @@ function mcl_potions._extinguish_nearby_fire(pos, radius)
|
|||
end
|
||||
return exting
|
||||
end
|
||||
|
||||
|
|
|
@ -66,13 +66,13 @@ minetest.register_globalstep(function(dtime)
|
|||
-- set head pitch and yaw when swimming
|
||||
player:set_bone_position("Head", vector.new(0,6.3,0), vector.new(pitch+90-degrees(dir_to_pitch(player_velocity)),yaw - player_vel_yaw * -1,0))
|
||||
-- sets eye height, and nametag color accordingly
|
||||
player:set_properties({collisionbox = {-0.35,0,-0.35,0.35,0.8,0.35}, eye_height = 0.65, nametag_color = { r = 225, b = 225, a = 225, g = 225 }})
|
||||
player:set_properties({collisionbox = {-0.35,0,-0.35,0.35,0.8,0.35}, eye_height = 0.5, nametag_color = { r = 225, b = 225, a = 225, g = 225 }})
|
||||
-- control body bone when swimming
|
||||
player:set_bone_position("Body_Control", vector.new(0,6.3,0), vector.new(degrees(dir_to_pitch(player_velocity)) - 90,player_vel_yaw * -1 - yaw + 180,0))
|
||||
|
||||
elseif player:get_attach() == nil then
|
||||
-- sets eye height, and nametag color accordingly
|
||||
player:set_properties({collisionbox = {-0.35,0,-0.35,0.35,1.8,0.35}, eye_height = 1.65, nametag_color = { r = 225, b = 225, a = 225, g = 225 }})
|
||||
player:set_properties({collisionbox = {-0.35,0,-0.35,0.35,1.8,0.35}, eye_height = 1.5, nametag_color = { r = 225, b = 225, a = 225, g = 225 }})
|
||||
|
||||
if player_velocity.x > 0.35 or player_velocity.z > 0.35 or player_velocity.x < -0.35 or player_velocity.z < -0.35 then
|
||||
if player_vel_yaw * -1 - yaw < 90 or player_vel_yaw * -1 - yaw > 270 then
|
||||
|
@ -91,7 +91,7 @@ minetest.register_globalstep(function(dtime)
|
|||
else
|
||||
local attached = player:get_attach(parent)
|
||||
local attached_yaw = degrees(attached:get_yaw())
|
||||
player:set_properties({collisionbox = {-0.35,0,-0.35,0.35,1.8,0.35}, eye_height = 1.65, nametag_color = { r = 225, b = 225, a = 225, g = 225 }})
|
||||
player:set_properties({collisionbox = {-0.35,0,-0.35,0.35,1.8,0.35}, eye_height = 1.5, nametag_color = { r = 225, b = 225, a = 225, g = 225 }})
|
||||
player:set_bone_position("Head", vector.new(0,6.3,0), vector.new(pitch,degrees(player:get_look_horizontal()) * -1 + attached_yaw,0))
|
||||
player:set_bone_position("Body_Control", vector.new(0,6.3,0), vector.new(0,0,0))
|
||||
end
|
||||
|
@ -201,7 +201,7 @@ minetest.register_globalstep(function(dtime)
|
|||
if minetest.get_item_group(node_feet, "liquid") ~= 0 and mcl_enchanting.get_enchantment(player:get_inventory():get_stack("armor", 5), "depth_strider") then
|
||||
local boots = player:get_inventory():get_stack("armor", 5)
|
||||
local depth_strider = mcl_enchanting.get_enchantment(boots, "depth_strider")
|
||||
|
||||
|
||||
if depth_strider > 0 then
|
||||
playerphysics.add_physics_factor(player, "speed", "mcl_playerplus:surface", (depth_strider / 3) + 0.75)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user