Rename mcl_playerphysics to playerphysics

This commit is contained in:
Wuzzy 2018-10-23 18:51:19 +02:00
parent e0fe5b2c66
commit b076bafaa7
12 changed files with 34 additions and 34 deletions

View file

@ -1,4 +1,4 @@
mcl_playerphysics
playerphysics
mcl_sounds?
mcl_worlds?
mcl_wool?

View file

@ -110,8 +110,8 @@ local function lay_down(player, pos, bed_pos, state, skip)
player:set_eye_offset({x = 0, y = 0, z = 0}, {x = 0, y = 0, z = 0})
player:set_look_horizontal(math.random(1, 180) / 100)
mcl_player.player_attached[name] = false
mcl_playerphysics.remove_physics_factor(player, "speed", "mcl_beds:sleeping")
mcl_playerphysics.remove_physics_factor(player, "jump", "mcl_beds:sleeping")
playerphysics.remove_physics_factor(player, "speed", "mcl_beds:sleeping")
playerphysics.remove_physics_factor(player, "jump", "mcl_beds:sleeping")
player:set_attribute("mcl_beds:sleeping", "false")
hud_flags.wielditem = true
mcl_player.player_set_animation(player, "stand" , 30)
@ -129,8 +129,8 @@ local function lay_down(player, pos, bed_pos, state, skip)
local dir = minetest.facedir_to_dir(param2)
local p = {x = bed_pos.x + dir.x / 2, y = bed_pos.y, z = bed_pos.z + dir.z / 2}
player:set_attribute("mcl_beds:sleeping", "true")
mcl_playerphysics.add_physics_factor(player, "speed", "mcl_beds:sleeping", 0)
mcl_playerphysics.add_physics_factor(player, "jump", "mcl_beds:sleeping", 0)
playerphysics.add_physics_factor(player, "speed", "mcl_beds:sleeping", 0)
playerphysics.add_physics_factor(player, "jump", "mcl_beds:sleeping", 0)
player:setpos(p)
mcl_player.player_attached[name] = true
hud_flags.wielditem = false

View file

@ -127,8 +127,8 @@ end
local reset_bow_state = function(player, also_reset_bows)
bow_load[player:get_player_name()] = nil
bow_index[player:get_player_name()] = nil
if minetest.get_modpath("mcl_playerphysics") then
mcl_playerphysics.remove_physics_factor(player, "speed", "mcl_bows:use_bow")
if minetest.get_modpath("playerphysics") then
playerphysics.remove_physics_factor(player, "speed", "mcl_bows:use_bow")
end
if also_reset_bows then
reset_bows(player)
@ -222,9 +222,9 @@ controls.register_on_hold(function(player, key, time)
if bow_load[name] == nil and wielditem:get_name()=="mcl_bows:bow" and (minetest.settings:get_bool("creative_mode") or inv:contains_item("main", "mcl_bows:arrow")) then
wielditem:set_name("mcl_bows:bow_0")
player:set_wielded_item(wielditem)
if minetest.get_modpath("mcl_playerphysics") then
if minetest.get_modpath("playerphysics") then
-- Slow player down when using bow
mcl_playerphysics.add_physics_factor(player, "speed", "mcl_bows:use_bow", PLAYER_USE_BOW_SPEED)
playerphysics.add_physics_factor(player, "speed", "mcl_bows:use_bow", PLAYER_USE_BOW_SPEED)
end
bow_load[name] = minetest.get_us_time()
bow_index[name] = player:get_wield_index()

View file

@ -4,7 +4,7 @@ mcl_achievements?
mcl_hunger?
mcl_core?
mcl_mobitems?
mcl_playerphysics?
playerphysics?
doc?
doc_identifier?
mesecons_button?