aboutsummaryrefslogtreecommitdiff
path: root/server/src/entity/campaign.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-10-19 20:16:38 +0200
committermetamuffin <metamuffin@disroot.org>2025-10-19 20:16:38 +0200
commit239f139e7cdc2ee9f2658a8038d2870293e20aa4 (patch)
tree9b54500dd4bcb50088c60376ad1465e3349f8e70 /server/src/entity/campaign.rs
parent6979c0a1b6503cb4b4e96e66cba5fc10a2d89b4b (diff)
downloadhurrycurry-239f139e7cdc2ee9f2658a8038d2870293e20aa4.tar
hurrycurry-239f139e7cdc2ee9f2658a8038d2870293e20aa4.tar.bz2
hurrycurry-239f139e7cdc2ee9f2658a8038d2870293e20aa4.tar.zst
Start moving game logic to client-lib. Moved set_tile and gamedata index
Diffstat (limited to 'server/src/entity/campaign.rs')
-rw-r--r--server/src/entity/campaign.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/server/src/entity/campaign.rs b/server/src/entity/campaign.rs
index ddbdc3bc..1966fc01 100644
--- a/server/src/entity/campaign.rs
+++ b/server/src/entity/campaign.rs
@@ -16,7 +16,7 @@
*/
use super::{Entity, EntityContext};
-use crate::{scoreboard::ScoreboardStore, server::GameServerExt};
+use crate::scoreboard::ScoreboardStore;
use anyhow::Result;
use hurrycurry_data::entities::GateCondition;
use hurrycurry_locale::{TrError, trm};
@@ -60,9 +60,7 @@ impl Entity for Gate {
self.active = false;
self.unlocked = self.condition.check(c.scoreboard);
if !self.unlocked {
- c.game
- .set_tile(self.pos, Some(self.blocker_tile), c.packet_out);
- c.packet_out.push_back(PacketC::FlushMap); // TODO dont send too often
+ c.game.set_tile(self.pos, Some(self.blocker_tile));
}
}
Ok(())