summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-07-08 23:00:56 +0200
committermetamuffin <metamuffin@disroot.org>2024-07-08 23:00:56 +0200
commit04e46e9bfc7fed7b9954735284c09a4eb8a90952 (patch)
treea067923178ab3300fb9858fdfe7461fda121d841
parent72d970f1b0ff7dc3e9793fbaceeb1564c90416fd (diff)
downloadhurrycurry-04e46e9bfc7fed7b9954735284c09a4eb8a90952.tar
hurrycurry-04e46e9bfc7fed7b9954735284c09a4eb8a90952.tar.bz2
hurrycurry-04e46e9bfc7fed7b9954735284c09a4eb8a90952.tar.zst
prevent all interactions between clients and customers
-rw-r--r--server/src/game.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/src/game.rs b/server/src/game.rs
index 6ad2316c..178a0ebd 100644
--- a/server/src/game.rs
+++ b/server/src/game.rs
@@ -361,6 +361,11 @@ impl Game {
.players
.get_many_mut([&pid, &base_pid])
.ok_or(anyhow!("interacting with yourself. this is impossible"))?;
+
+ if this.character < 0 || other.character < 0 {
+ bail!("You shall not interact with customers.")
+ }
+
interact_effect(
&self.data,
edge,