bit more style
This commit is contained in:
parent
b8d380668d
commit
2ed3c5eeba
12
init.lua
12
init.lua
|
@ -53,15 +53,19 @@
|
||||||
-- 2022-05-16
|
-- 2022-05-16
|
||||||
-- Add Z-index to theoretically be behind hotbar and practically behind other HUDs
|
-- Add Z-index to theoretically be behind hotbar and practically behind other HUDs
|
||||||
|
|
||||||
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
|
||||||
hangglider = {} --Make this global, so other mods can tell if hangglider exists.
|
hangglider = {} -- Make this global, so other mods can tell if hangglider exists.
|
||||||
hangglider.use = {}
|
hangglider.use = {}
|
||||||
|
|
||||||
if HUD_Overlay then
|
if HUD_Overlay then
|
||||||
hangglider.id = {} -- hud id for displaying overlay with struts
|
hangglider.id = {} -- hud id for displaying overlay with struts
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if debug then -- hud id for debug data
|
||||||
|
hangglider.debug = {}
|
||||||
|
end
|
||||||
|
|
||||||
if minetest.get_modpath("areas") then
|
if minetest.get_modpath("areas") then
|
||||||
hangglider.flak = true
|
hangglider.flak = true
|
||||||
-- chat command definition essentially copied from areas mod.
|
-- chat command definition essentially copied from areas mod.
|
||||||
|
@ -163,7 +167,7 @@ minetest.register_entity("hangglider:glider", {
|
||||||
step_v = player:get_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.
|
||||||
apply_physics_override(player, {speed=2.25})
|
apply_physics_override(player, {speed=2.25})
|
||||||
else
|
else
|
||||||
remove_physics_override(player, {speed=1})
|
remove_physics_override(player, {speed=1})
|
||||||
|
|
Loading…
Reference in New Issue