mirror of
https://github.com/minetest/minetest.git
synced 2024-11-30 11:33:44 +01:00
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.
This commit is contained in:
parent
24b32ab09d
commit
15e1dcc020
@ -332,8 +332,10 @@ collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef,
|
|||||||
|
|
||||||
// Do not move if world has not loaded yet, since custom node boxes
|
// Do not move if world has not loaded yet, since custom node boxes
|
||||||
// are not available for collision detection.
|
// are not available for collision detection.
|
||||||
if (!any_position_valid)
|
if (!any_position_valid) {
|
||||||
|
*speed_f = v3f(0, 0, 0);
|
||||||
return result;
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
} // tt2
|
} // tt2
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user