From 15e1dcc020ca5c64e4b5b306529e513cb2b97bef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nathana=C3=ABl=20Courant?= Date: Wed, 6 Apr 2016 01:11:36 +0200 Subject: [PATCH] Fix #3955 (player dying on login). It was caused by player not moving because fall was prevented, but their velocity still increasing, causing fatal fall damage when world was finally loaded. This commit fixes it by setting player velocity to zero when the world around them is not loaded. --- src/collision.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/collision.cpp b/src/collision.cpp index 16db3310c..74c0c25c3 100644 --- a/src/collision.cpp +++ b/src/collision.cpp @@ -332,8 +332,10 @@ collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef, // Do not move if world has not loaded yet, since custom node boxes // are not available for collision detection. - if (!any_position_valid) + if (!any_position_valid) { + *speed_f = v3f(0, 0, 0); return result; + } } // tt2