From ed3b075b924ff434fdf78fadd24131d74026975a Mon Sep 17 00:00:00 2001 From: Gwilym Kuiper Date: Sat, 5 Mar 2022 19:34:47 +0000 Subject: [PATCH] Fix issue if you are damaged while doing a jump attack --- examples/the-purple-night/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/the-purple-night/src/main.rs b/examples/the-purple-night/src/main.rs index 02013e28..462ad01c 100644 --- a/examples/the-purple-night/src/main.rs +++ b/examples/the-purple-night/src/main.rs @@ -375,7 +375,7 @@ impl SwordState { } } fn jump_attack_frame(self, timer: u16) -> u16 { - (self.jump_attack_duration() - timer) / 8 + (self.jump_attack_duration().saturating_sub(timer)) / 8 } fn hold_frame(self) -> u16 { 7