diff options
author | metamuffin <metamuffin@disroot.org> | 2025-06-06 21:30:28 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-06-06 21:30:28 +0200 |
commit | 205d5f2ae8eaea03a78d3c027913c0fa44acceea (patch) | |
tree | d69fd322c1500b88ca56662915540363c7a4df97 /server/src/entity/environment_effect.rs | |
parent | 1a64e614b72e1635986c7e8d406a9a9727f52984 (diff) | |
download | hurrycurry-205d5f2ae8eaea03a78d3c027913c0fa44acceea.tar hurrycurry-205d5f2ae8eaea03a78d3c027913c0fa44acceea.tar.bz2 hurrycurry-205d5f2ae8eaea03a78d3c027913c0fa44acceea.tar.zst |
fix arith bug in env effect
Diffstat (limited to 'server/src/entity/environment_effect.rs')
-rw-r--r-- | server/src/entity/environment_effect.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/src/entity/environment_effect.rs b/server/src/entity/environment_effect.rs index b0e811c3..4976d9a3 100644 --- a/server/src/entity/environment_effect.rs +++ b/server/src/entity/environment_effect.rs @@ -15,7 +15,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -use super::{EntityContext, Entity}; +use super::{Entity, EntityContext}; use hurrycurry_protocol::PacketC; use rand::random; use serde::{Deserialize, Serialize}; @@ -54,7 +54,7 @@ impl Entity for EnvironmentEffectController { if self.next_transition < Instant::now() { if self.active { self.next_transition += - Duration::from_secs_f32(self.config.on + (0.5 + random::<f32>())); + Duration::from_secs_f32(self.config.on * (0.5 + random::<f32>())); self.active = false; c.game.environment_effects.remove(&self.config.name); } else { |