Skip to content

Commit 15e1dcc

Browse files
Ekdohibsest31
authored andcommittedApr 5, 2016
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.
1 parent 24b32ab commit 15e1dcc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎src/collision.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,10 @@ collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef,
332332

333333
// Do not move if world has not loaded yet, since custom node boxes
334334
// are not available for collision detection.
335-
if (!any_position_valid)
335+
if (!any_position_valid) {
336+
*speed_f = v3f(0, 0, 0);
336337
return result;
338+
}
337339

338340
} // tt2
339341

0 commit comments

Comments
 (0)
Please sign in to comment.