diff options
Diffstat (limited to 'server/src/entity/environment_effect.rs')
-rw-r--r-- | server/src/entity/environment_effect.rs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/server/src/entity/environment_effect.rs b/server/src/entity/environment_effect.rs index 0a7087c0..95040954 100644 --- a/server/src/entity/environment_effect.rs +++ b/server/src/entity/environment_effect.rs @@ -74,13 +74,10 @@ impl Entity for EnvironmentEffectController { #[derive(Debug, Clone)] pub struct EnvironmentController(pub Vec<String>); impl Entity for EnvironmentController { - fn tick(&mut self, c: EntityContext) -> anyhow::Result<()> { - if c.game.environment_effects.is_empty() { - c.game.environment_effects.extend(self.0.clone()); - c.packet_out.push_back(PacketC::Environment { - effects: c.game.environment_effects.clone(), - }) - } - Ok(()) + fn constructor(&mut self, c: EntityContext) { + c.game.environment_effects.extend(self.0.clone()); + c.packet_out.push_back(PacketC::Environment { + effects: c.game.environment_effects.clone(), + }) } } |