diff options
author | metamuffin <metamuffin@disroot.org> | 2024-09-21 01:03:57 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-09-21 01:04:03 +0200 |
commit | 8153645c68781a66a0d5ad14a6a6b3dcfb82dc8e (patch) | |
tree | 1a7151ca1cef666b1cddf3142c097560c3f6ae5a /server/src/interaction.rs | |
parent | 2a8bf7cbc07e7d190e9344c697edf40547526121 (diff) | |
download | hurrycurry-8153645c68781a66a0d5ad14a6a6b3dcfb82dc8e.tar hurrycurry-8153645c68781a66a0d5ad14a6a6b3dcfb82dc8e.tar.bz2 hurrycurry-8153645c68781a66a0d5ad14a6a6b3dcfb82dc8e.tar.zst |
negative active speed, fix #124
Diffstat (limited to 'server/src/interaction.rs')
-rw-r--r-- | server/src/interaction.rs | 1 |
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(); |