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 function add_wield_entity(player)
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
local pos = player:getpos()
|
local pos = player:get_pos()
|
||||||
local inv = player:get_inventory()
|
local inv = player:get_inventory()
|
||||||
if name and pos and inv then
|
if name and pos and inv then
|
||||||
local offset = {x=pos.x, y=pos.y + 0.5, z=pos.z}
|
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
|
local player = self.player
|
||||||
if player then
|
if player then
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
local p1 = player:getpos()
|
local p1 = player:get_pos()
|
||||||
local p2 = self.object:getpos()
|
local p2 = self.object:get_pos()
|
||||||
if p1 and p2 then
|
if p1 and p2 then
|
||||||
if vector.equals(p1, p2) then
|
if vector.equals(p1, p2) then
|
||||||
local stack = player:get_wielded_item()
|
local stack = player:get_wielded_item()
|
||||||
|
|
|
@ -53,7 +53,7 @@ minetest.register_entity("shooter:arrow_entity", {
|
||||||
acceleration = {x=0, y=0, z=0}
|
acceleration = {x=0, y=0, z=0}
|
||||||
end
|
end
|
||||||
if pos then
|
if pos then
|
||||||
self.object:moveto(pos)
|
self.object:move_to(pos)
|
||||||
end
|
end
|
||||||
self.object:set_properties({
|
self.object:set_properties({
|
||||||
physical = true,
|
physical = true,
|
||||||
|
@ -186,7 +186,7 @@ for _, color in pairs(dye_basecolors) do
|
||||||
itemstack = "shooter:crossbow 1 "..itemstack:get_wear()
|
itemstack = "shooter:crossbow 1 "..itemstack:get_wear()
|
||||||
local pos = user:get_pos()
|
local pos = user:get_pos()
|
||||||
local dir = user:get_look_dir()
|
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
|
if pos and dir and yaw then
|
||||||
pos.y = pos.y + 1.5
|
pos.y = pos.y + 1.5
|
||||||
local obj = minetest.add_entity(pos, "shooter:arrow_entity")
|
local obj = minetest.add_entity(pos, "shooter:arrow_entity")
|
||||||
|
|
|
@ -52,7 +52,7 @@ minetest.register_tool("shooter:grenade", {
|
||||||
end
|
end
|
||||||
local pos = user:get_pos()
|
local pos = user:get_pos()
|
||||||
local dir = user:get_look_dir()
|
local dir = user:get_look_dir()
|
||||||
local yaw = user:get_look_yaw()
|
local yaw = user:get_look_horizontal()
|
||||||
if pos and dir then
|
if pos and dir then
|
||||||
pos.y = pos.y + 1.5
|
pos.y = pos.y + 1.5
|
||||||
local obj = minetest.add_entity(pos, "shooter:grenade_entity")
|
local obj = minetest.add_entity(pos, "shooter:grenade_entity")
|
||||||
|
|
Loading…
Reference in a new issue