Fix deprecated API method calls
This commit is contained in:
parent
1aca94fd8c
commit
85959ba913
3 changed files with 6 additions and 6 deletions
|
@ -21,7 +21,7 @@ local timer = 0
|
|||
|
||||
local function add_wield_entity(player)
|
||||
local name = player:get_player_name()
|
||||
local pos = player:getpos()
|
||||
local pos = player:get_pos()
|
||||
local inv = player:get_inventory()
|
||||
if name and pos and inv then
|
||||
local offset = {x=pos.x, y=pos.y + 0.5, z=pos.z}
|
||||
|
@ -64,8 +64,8 @@ minetest.register_entity("wield3d:wield_entity", {
|
|||
local player = self.player
|
||||
if player then
|
||||
local name = player:get_player_name()
|
||||
local p1 = player:getpos()
|
||||
local p2 = self.object:getpos()
|
||||
local p1 = player:get_pos()
|
||||
local p2 = self.object:get_pos()
|
||||
if p1 and p2 then
|
||||
if vector.equals(p1, p2) then
|
||||
local stack = player:get_wielded_item()
|
||||
|
|
|
@ -53,7 +53,7 @@ minetest.register_entity("shooter:arrow_entity", {
|
|||
acceleration = {x=0, y=0, z=0}
|
||||
end
|
||||
if pos then
|
||||
self.object:moveto(pos)
|
||||
self.object:move_to(pos)
|
||||
end
|
||||
self.object:set_properties({
|
||||
physical = true,
|
||||
|
@ -186,7 +186,7 @@ for _, color in pairs(dye_basecolors) do
|
|||
itemstack = "shooter:crossbow 1 "..itemstack:get_wear()
|
||||
local pos = user:get_pos()
|
||||
local dir = user:get_look_dir()
|
||||
local yaw = user:get_look_yaw()
|
||||
local yaw = user:get_look_horizontal()
|
||||
if pos and dir and yaw then
|
||||
pos.y = pos.y + 1.5
|
||||
local obj = minetest.add_entity(pos, "shooter:arrow_entity")
|
||||
|
|
|
@ -52,7 +52,7 @@ minetest.register_tool("shooter:grenade", {
|
|||
end
|
||||
local pos = user:get_pos()
|
||||
local dir = user:get_look_dir()
|
||||
local yaw = user:get_look_yaw()
|
||||
local yaw = user:get_look_horizontal()
|
||||
if pos and dir then
|
||||
pos.y = pos.y + 1.5
|
||||
local obj = minetest.add_entity(pos, "shooter:grenade_entity")
|
||||
|
|
Loading…
Reference in a new issue