fixed: crash when client is punched while exiting server

added: README
This commit is contained in:
rnd1 2016-08-21 18:01:31 +02:00
parent 9985cb6d23
commit 7e513f704c
2 changed files with 23 additions and 0 deletions

22
README Normal file
View File

@ -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 <http://www.gnu.org/licenses/>.
----------------------------------------------------------------------

View File

@ -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;