aboutsummaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-09-21 01:03:57 +0200
committermetamuffin <metamuffin@disroot.org>2024-09-21 01:04:03 +0200
commit8153645c68781a66a0d5ad14a6a6b3dcfb82dc8e (patch)
tree1a7151ca1cef666b1cddf3142c097560c3f6ae5a /server/src
parent2a8bf7cbc07e7d190e9344c697edf40547526121 (diff)
downloadhurrycurry-8153645c68781a66a0d5ad14a6a6b3dcfb82dc8e.tar
hurrycurry-8153645c68781a66a0d5ad14a6a6b3dcfb82dc8e.tar.bz2
hurrycurry-8153645c68781a66a0d5ad14a6a6b3dcfb82dc8e.tar.zst
negative active speed, fix #124
Diffstat (limited to 'server/src')
-rw-r--r--server/src/interaction.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/server/src/interaction.rs b/server/src/interaction.rs
index 3a950fba..7a8c2e9d 100644
--- a/server/src/interaction.rs
+++ b/server/src/interaction.rs
@@ -51,6 +51,7 @@ pub fn interact(
active.speed += speed;
} else {
active.speed -= speed;
+ active.speed = active.speed.max(0.); // in case of "release without press" when items cool on active tile
}
if active.position >= 1. {
let this_had_item = this.is_some();