1
0
Fork 0

Fix player getting thrown underground after connecting

mutilcraft-mt53
Perttu Ahola 2011-11-26 15:58:02 +02:00
parent b2ccbdffc1
commit 41c473cf5e
1 changed files with 4 additions and 3 deletions

View File

@ -1974,8 +1974,7 @@ void ClientEnvironment::step(float dtime)
*/ */
bool is_climbing = lplayer->is_climbing; bool is_climbing = lplayer->is_climbing;
f32 player_speed = 0.001; // just some small value f32 player_speed = lplayer->getSpeed().getLength();
player_speed = lplayer->getSpeed().getLength();
/* /*
Maximum position increment Maximum position increment
@ -1985,7 +1984,9 @@ void ClientEnvironment::step(float dtime)
// Maximum time increment (for collision detection etc) // Maximum time increment (for collision detection etc)
// time = distance / speed // 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 // Maximum time increment is 10ms or lower
if(dtime_max_increment > 0.01) if(dtime_max_increment > 0.01)