diff options
| author | mat <git@matdoes.dev> | 2023-09-19 02:01:39 -0500 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2023-09-19 02:01:39 -0500 |
| commit | 83cce236145cdab1872a472a70943b669a880965 (patch) | |
| tree | 2ce4a6c6e46b887e100e3e710e4c809d3a1e7279 /azalea-entity/src/plugin/mod.rs | |
| parent | 51963990bc0cbbbca388b2ed015fd64ff6492d7b (diff) | |
| download | azalea-drasl-83cce236145cdab1872a472a70943b669a880965.tar.xz | |
add Loaded component and fix clamping look direction
Diffstat (limited to 'azalea-entity/src/plugin/mod.rs')
| -rw-r--r-- | azalea-entity/src/plugin/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/azalea-entity/src/plugin/mod.rs b/azalea-entity/src/plugin/mod.rs index a75673ab..1f5fd3bd 100644 --- a/azalea-entity/src/plugin/mod.rs +++ b/azalea-entity/src/plugin/mod.rs @@ -129,7 +129,7 @@ pub struct LoadedBy(pub HashSet<Entity>); pub fn clamp_look_direction(mut query: Query<&mut LookDirection>) { for mut look_direction in &mut query { - look_direction.y_rot %= 360.0; + look_direction.y_rot = look_direction.y_rot.rem_euclid(360.0); look_direction.x_rot = look_direction.x_rot.clamp(-90.0, 90.0) % 360.0; } } |
