Fix y_speed for syncs

This commit is contained in:
Sofia 2026-08-09 00:13:18 +03:00
parent d1f2607779
commit 3bf81c4cb9

View File

@ -1081,7 +1081,7 @@ impl Game {
let remote_location: Vector3 = transform.location.into();
let max_distance = (player.data.ping as f32 / 1000.)
* (player.get_move_speed() + player.get_y_speed())
* (player.get_move_speed() + player.get_y_speed().max(5.))
* 2.;
if local_location.distance_to(remote_location) > max_distance {
@ -1617,7 +1617,8 @@ impl Player {
let client_pos: Vector3 = data.transform.location.into();
let max_distance = (self.data.ping as f32 / 1000.)
* (character.dyn_bind().get_move_speed() + character.dyn_bind().get_y_speed());
* (character.dyn_bind().get_move_speed()
+ character.dyn_bind().get_y_speed().max(5.));
if client_pos.distance_to(server_pos) <= max_distance {
character.dyn_bind_mut().apply_position(client_pos);