From 0296ee1a2c2e42c1fb8b94d3e55e42ac3a15ce9f Mon Sep 17 00:00:00 2001 From: crabman Date: Fri, 22 Mar 2024 23:24:56 +0000 Subject: [PATCH] Fix panic when interrupting rolls just before ending on slower clients --- common/src/comp/ability.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/src/comp/ability.rs b/common/src/comp/ability.rs index 54eae6dd46..bc98b1c522 100644 --- a/common/src/comp/ability.rs +++ b/common/src/comp/ability.rs @@ -1238,7 +1238,8 @@ impl CharacterAbility { } } else { 0.0 - }; + } + .max(0.0); CharacterAbility::Roll { energy_cost: 10.85, // Remaining recover flows into buildup