Fix y_speed for syncs
This commit is contained in:
parent
d1f2607779
commit
3bf81c4cb9
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user