forked from mtcontrib/hangglider
simplified liquid check
This commit is contained in:
parent
61b870b9af
commit
62b8366905
5
init.lua
5
init.lua
@ -37,7 +37,8 @@
|
|||||||
-- Improved gravity adjustment function.
|
-- Improved gravity adjustment function.
|
||||||
-- Changed airbreaking process
|
-- Changed airbreaking process
|
||||||
-- Removed airbreak penalty, as any 'advantage' seems minimal after new adjustments
|
-- Removed airbreak penalty, as any 'advantage' seems minimal after new adjustments
|
||||||
|
-- Removed airbreak until minetest devs are smart enough to implement better serverside players.
|
||||||
|
-- Simplified liquid check.
|
||||||
|
|
||||||
local HUD_Overlay = true --show glider struts as overlay on HUD
|
local HUD_Overlay = true --show glider struts as overlay on HUD
|
||||||
local debug = false --show debug info in top-center of hud
|
local debug = false --show debug info in top-center of hud
|
||||||
@ -120,7 +121,7 @@ minetest.register_entity("hangglider:glider", {
|
|||||||
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]
|
||||||
if mrn_name then
|
if mrn_name then
|
||||||
if not (mrn_name.walkable or (mrn_name.drowning and mrn_name.drowning == 1)) then
|
if not (mrn_name.walkable or mrn_name.liquidtype) then
|
||||||
canExist = true
|
canExist = true
|
||||||
step_v = player:get_player_velocity().y
|
step_v = player:get_player_velocity().y
|
||||||
if step_v < 0 and step_v > -3 then
|
if step_v < 0 and step_v > -3 then
|
||||||
|
Loading…
Reference in New Issue
Block a user