mirror of
https://github.com/minetest/minetest.git
synced 2024-11-10 01:33:46 +01:00
Fix player getting thrown underground after connecting
This commit is contained in:
parent
b2ccbdffc1
commit
41c473cf5e
@ -1974,8 +1974,7 @@ void ClientEnvironment::step(float dtime)
|
||||
*/
|
||||
bool is_climbing = lplayer->is_climbing;
|
||||
|
||||
f32 player_speed = 0.001; // just some small value
|
||||
player_speed = lplayer->getSpeed().getLength();
|
||||
f32 player_speed = lplayer->getSpeed().getLength();
|
||||
|
||||
/*
|
||||
Maximum position increment
|
||||
@ -1985,7 +1984,9 @@ void ClientEnvironment::step(float dtime)
|
||||
|
||||
// Maximum time increment (for collision detection etc)
|
||||
// time = distance / speed
|
||||
f32 dtime_max_increment = position_max_increment / player_speed;
|
||||
f32 dtime_max_increment = 1;
|
||||
if(player_speed > 0.001)
|
||||
dtime_max_increment = position_max_increment / player_speed;
|
||||
|
||||
// Maximum time increment is 10ms or lower
|
||||
if(dtime_max_increment > 0.01)
|
||||
|
Loading…
Reference in New Issue
Block a user