aboutsummaryrefslogtreecommitdiff
path: root/server/src/entity
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-06-06 21:30:28 +0200
committermetamuffin <metamuffin@disroot.org>2025-06-06 21:30:28 +0200
commit205d5f2ae8eaea03a78d3c027913c0fa44acceea (patch)
treed69fd322c1500b88ca56662915540363c7a4df97 /server/src/entity
parent1a64e614b72e1635986c7e8d406a9a9727f52984 (diff)
downloadhurrycurry-205d5f2ae8eaea03a78d3c027913c0fa44acceea.tar
hurrycurry-205d5f2ae8eaea03a78d3c027913c0fa44acceea.tar.bz2
hurrycurry-205d5f2ae8eaea03a78d3c027913c0fa44acceea.tar.zst
fix arith bug in env effect
Diffstat (limited to 'server/src/entity')
-rw-r--r--server/src/entity/environment_effect.rs4
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 {