From 7e513f704c3a447c239d7606babca76cc9b1014c Mon Sep 17 00:00:00 2001 From: rnd1 Date: Sun, 21 Aug 2016 18:01:31 +0200 Subject: [PATCH] fixed: crash when client is punched while exiting server added: README --- README | 22 ++++++++++++++++++++++ enviro.lua | 1 + 2 files changed, 23 insertions(+) create mode 100644 README diff --git a/README b/README new file mode 100644 index 0000000..dbaa6d5 --- /dev/null +++ b/README @@ -0,0 +1,22 @@ +BASIC_MACHINES: lightweight automation mod for minetest +minetest 0.4.14 +(c) 2015-2016 rnd + +MANUAL: + 1.WIKI PAGES: https://github.com/ac-minetest/basic_machines/wiki + 2.ingame help: right click mover/detector/keypad.. and click help button + +--------------------------------------------------------------------- +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +---------------------------------------------------------------------- \ No newline at end of file diff --git a/enviro.lua b/enviro.lua index 3dcd9f5..6152c34 100644 --- a/enviro.lua +++ b/enviro.lua @@ -324,6 +324,7 @@ end) minetest.register_on_punchplayer( -- bring gravity closer to normal with each punch function(player, hitter, time_from_last_punch, tool_capabilities, dir, damage) + if player:get_physics_override() == nil then return end local gravity = player:get_physics_override().gravity; if gravity<1 then gravity = 0.5*gravity+0.5;