mirror of
https://github.com/mt-mods/hangglider.git
synced 2024-09-25 13:50:41 +02:00
Revert "fix fly upwards" workaround
This commit is contained in:
parent
cd48ef801f
commit
ec320cbcd3
7
init.lua
7
init.lua
|
@ -120,11 +120,8 @@ end
|
||||||
local has_player_monoids = minetest.get_modpath("player_monoids")
|
local has_player_monoids = minetest.get_modpath("player_monoids")
|
||||||
|
|
||||||
local physics_attrs = {"jump", "speed", "gravity"}
|
local physics_attrs = {"jump", "speed", "gravity"}
|
||||||
|
|
||||||
local function apply_physics_override(player, overrides)
|
local function apply_physics_override(player, overrides)
|
||||||
-- prevent flys to the world border
|
|
||||||
if overrides.gravity and overrides.gravity < 0 then
|
|
||||||
overrides.gravity = 0
|
|
||||||
end
|
|
||||||
if has_player_monoids then
|
if has_player_monoids then
|
||||||
for _, attr in pairs(physics_attrs) do
|
for _, attr in pairs(physics_attrs) do
|
||||||
if overrides[attr] then
|
if overrides[attr] then
|
||||||
|
@ -148,7 +145,6 @@ local function remove_physics_override(player, overrides)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local step_v
|
|
||||||
minetest.register_entity("hangglider:glider", {
|
minetest.register_entity("hangglider:glider", {
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
visual_size = {x = 12, y = 12},
|
visual_size = {x = 12, y = 12},
|
||||||
|
@ -158,6 +154,7 @@ minetest.register_entity("hangglider:glider", {
|
||||||
static_save = false,
|
static_save = false,
|
||||||
textures = {"wool_white.png", "default_wood.png"},
|
textures = {"wool_white.png", "default_wood.png"},
|
||||||
on_step = function(self, dtime)
|
on_step = function(self, dtime)
|
||||||
|
local step_v
|
||||||
local canExist = false
|
local canExist = false
|
||||||
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")
|
||||||
|
|
BIN
sounds/bedsheet.ogg
Executable file → Normal file
BIN
sounds/bedsheet.ogg
Executable file → Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user