aboutsummaryrefslogtreecommitdiff
path: root/server/src/entity/bot.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-10-19 00:38:09 +0200
committermetamuffin <metamuffin@disroot.org>2025-10-19 00:38:09 +0200
commit62d918e5feeaf5b3add982a5baaffb201a1f2ece (patch)
treeb14a0fa01f9df692592bf5d16543f43b6eb933d6 /server/src/entity/bot.rs
parent6b156bea343a0fd9a043dcfe7113986855a89aab (diff)
downloadhurrycurry-62d918e5feeaf5b3add982a5baaffb201a1f2ece.tar
hurrycurry-62d918e5feeaf5b3add982a5baaffb201a1f2ece.tar.bz2
hurrycurry-62d918e5feeaf5b3add982a5baaffb201a1f2ece.tar.zst
Implement interaction with other players through id instead of tile pos
Diffstat (limited to 'server/src/entity/bot.rs')
-rw-r--r--server/src/entity/bot.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/src/entity/bot.rs b/server/src/entity/bot.rs
index 78b300b6..9627bb76 100644
--- a/server/src/entity/bot.rs
+++ b/server/src/entity/bot.rs
@@ -18,7 +18,7 @@
use super::{Entity, EntityContext};
use anyhow::Result;
use hurrycurry_bot::{BotAlgo, DynBotAlgo};
-use hurrycurry_protocol::{Character, Hand, PacketS, PlayerClass, PlayerID};
+use hurrycurry_protocol::{Character, Hand, ItemLocation, PacketS, PlayerClass, PlayerID};
use log::debug;
use std::any::Any;
@@ -71,7 +71,7 @@ impl<T: BotAlgo + Any> Entity for BotDriver<T> {
self.interacting = input.interact.is_some();
c.packet_in.push_back(PacketS::Interact {
player: self.id,
- pos: input.interact,
+ target: input.interact.map(ItemLocation::Tile),
hand: Hand(0),
})
}