mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Avoid movement jitter (#13093)
This allows the client and server to agree on the position of objects and attached players even when there is lag.
This commit is contained in:
parent
55fafb7d25
commit
a98200bb4c
4 changed files with 14 additions and 7 deletions
|
@ -241,13 +241,13 @@ collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef,
|
|||
/*
|
||||
Calculate new velocity
|
||||
*/
|
||||
if (dtime > 0.5f) {
|
||||
if (dtime > DTIME_LIMIT) {
|
||||
if (!time_notification_done) {
|
||||
time_notification_done = true;
|
||||
infostream << "collisionMoveSimple: maximum step interval exceeded,"
|
||||
warningstream << "collisionMoveSimple: maximum step interval exceeded,"
|
||||
" lost movement details!"<<std::endl;
|
||||
}
|
||||
dtime = 0.5f;
|
||||
dtime = DTIME_LIMIT;
|
||||
} else {
|
||||
time_notification_done = false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue