aboutsummaryrefslogtreecommitdiff
path: root/azalea-physics/src/lib.rs
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2024-12-11 19:51:12 -0600
committerGitHub <noreply@github.com>2024-12-11 19:51:12 -0600
commite9136c9cbbf9010b8352127e129c1cd290f377bd (patch)
treedb83316a273153106dd3b343c9d6d4fce234d132 /azalea-physics/src/lib.rs
parent23932003d98db0f5f976146aa9a11e5d04a74695 (diff)
downloadazalea-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/lib.rs')
-rw-r--r--azalea-physics/src/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/azalea-physics/src/lib.rs b/azalea-physics/src/lib.rs
index c50095e4..2ca64b1f 100644
--- a/azalea-physics/src/lib.rs
+++ b/azalea-physics/src/lib.rs
@@ -100,7 +100,7 @@ fn travel(
let block_below: Box<dyn Block> = block_state_below.into();
let block_friction = block_below.behavior().friction;
- let inertia = if physics.on_ground {
+ let inertia = if physics.on_ground() {
block_friction * 0.91
} else {
0.91
@@ -178,7 +178,7 @@ pub fn ai_step(
if **jumping {
// TODO: jumping in liquids and jump delay
- if physics.on_ground {
+ if physics.on_ground() {
jump_from_ground(
&mut physics,
position,
@@ -358,7 +358,7 @@ fn get_friction_influenced_speed(
is_sprinting: bool,
) -> f32 {
// TODO: have speed & flying_speed fields in entity
- if physics.on_ground {
+ if physics.on_ground() {
let speed: f32 = attributes.speed.calculate() as f32;
speed * (0.216f32 / (friction * friction * friction))
} else {