diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2024-12-11 19:51:12 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-11 19:51:12 -0600 |
| commit | e9136c9cbbf9010b8352127e129c1cd290f377bd (patch) | |
| tree | db83316a273153106dd3b343c9d6d4fce234d132 /azalea-physics/src/collision | |
| parent | 23932003d98db0f5f976146aa9a11e5d04a74695 (diff) | |
| download | azalea-drasl-e9136c9cbbf9010b8352127e129c1cd290f377bd.tar.xz | |
Implement EntityPositionSync (#196)
* implement EntityPositionSync
* fix EntityPositionSync setting the wrong vec_delta_codec and also move into a RelativeEntityUpdate
Diffstat (limited to 'azalea-physics/src/collision')
| -rw-r--r-- | azalea-physics/src/collision/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/azalea-physics/src/collision/mod.rs b/azalea-physics/src/collision/mod.rs index 7d7ddc5e..913cedac 100644 --- a/azalea-physics/src/collision/mod.rs +++ b/azalea-physics/src/collision/mod.rs @@ -73,7 +73,7 @@ fn collide(movement: &Vec3, world: &Instance, physics: &azalea_entity::Physics) let y_collision = movement.y != collided_delta.y; let z_collision = movement.z != collided_delta.z; - let on_ground = physics.on_ground || y_collision && movement.y < 0.; + let on_ground = physics.on_ground() || y_collision && movement.y < 0.; let max_up_step = 0.6; if max_up_step > 0. && on_ground && (x_collision || z_collision) { @@ -192,7 +192,7 @@ pub fn move_colliding( physics.horizontal_collision = horizontal_collision; physics.vertical_collision = vertical_collision; - physics.on_ground = on_ground; + physics.set_on_ground(on_ground); // TODO: minecraft checks for a "minor" horizontal collision here |
