mirror of
https://github.com/mt-mods/hangglider.git
synced 2024-11-17 07:50:36 +01:00
Replace deprecated functions (#4)
* Replace deprecated functions * add min_minetest_version
This commit is contained in:
parent
b65b6473c7
commit
bbde71805a
|
@ -1,5 +0,0 @@
|
||||||
default
|
|
||||||
wool
|
|
||||||
minetest_systemd?
|
|
||||||
areas?
|
|
||||||
player_monoids?
|
|
4
init.lua
4
init.lua
|
@ -218,7 +218,7 @@ minetest.register_entity("hangglider:glider", {
|
||||||
if self.object:get_attach() then
|
if self.object:get_attach() then
|
||||||
local player = self.object:get_attach("parent")
|
local player = self.object:get_attach("parent")
|
||||||
if player then
|
if player then
|
||||||
local pos = player:getpos()
|
local pos = player:get_pos()
|
||||||
local pname = player:get_player_name()
|
local pname = player:get_player_name()
|
||||||
if hangglider.use[pname] then
|
if hangglider.use[pname] then
|
||||||
local mrn_name = minetest.registered_nodes[minetest.get_node(vector.new(pos.x, pos.y-0.5, pos.z)).name]
|
local mrn_name = minetest.registered_nodes[minetest.get_node(vector.new(pos.x, pos.y-0.5, pos.z)).name]
|
||||||
|
@ -227,7 +227,7 @@ minetest.register_entity("hangglider:glider", {
|
||||||
canExist = true
|
canExist = true
|
||||||
|
|
||||||
if not minetestd then
|
if not minetestd then
|
||||||
step_v = player:get_player_velocity().y
|
step_v = player:get_velocity().y
|
||||||
if step_v < 0 and step_v > -3 then
|
if step_v < 0 and step_v > -3 then
|
||||||
apply_physics_override(player, {speed=math.abs(step_v/2) + 0.75})
|
apply_physics_override(player, {speed=math.abs(step_v/2) + 0.75})
|
||||||
elseif step_v <= -3 then --Cap our gliding movement speed.
|
elseif step_v <= -3 then --Cap our gliding movement speed.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user