Skip to content

Commit

Permalink
Fix #3955 (player dying on login).
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Ekdohibs authored and est31 committed Apr 5, 2016
1 parent 24b32ab commit 15e1dcc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/collision.cpp
Expand Up @@ -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

Expand Down

0 comments on commit 15e1dcc

Please sign in to comment.