diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cb915b3c2..cc857e1de6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Admins can now grant normal players plots to place blocks within - Diamonds are now much more than twice as expensive as twigs. - Permission to build is no longer tied to being an admin -- Seperated character randomization buttons into appearance and name. +- Separated character randomization buttons into appearance and name. - Reworked mindflayer to have unique attacks ### Removed diff --git a/common/src/comp/health.rs b/common/src/comp/health.rs index 280fa3732a..3015a01f44 100644 --- a/common/src/comp/health.rs +++ b/common/src/comp/health.rs @@ -132,7 +132,7 @@ impl Health { } /// Returns the fraction of health an entity has remaining - pub fn fraction(&self) -> f32 { self.current as f32 / self.maximum as f32 } + pub fn fraction(&self) -> f32 { self.current as f32 / self.maximum.max(1) as f32 } } #[cfg(not(target_arch = "wasm32"))]