just use equals like before

This commit is contained in:
Corwin 2023-04-17 23:53:44 +01:00
parent f67ffac227
commit 3f9fdd7c37
No known key found for this signature in database

View file

@ -600,7 +600,7 @@ impl<'a> Player<'a> {
AttackTimer::Attack(a) => {
*a -= 1;
let frame = self.sword.attack_frame(*a);
self.fudge_factor.x += self.sword.fudge(frame) * self.facing as i32;
self.fudge_factor.x = (self.sword.fudge(frame) * self.facing as i32).into();
let tag = self.sword.attack_tag();
let sprite = controller.sprite(tag.animation_sprite(frame as usize));
self.entity.sprite.set_sprite(sprite);
@ -614,7 +614,7 @@ impl<'a> Player<'a> {
AttackTimer::Cooldown(a) => {
*a -= 1;
let frame = self.sword.hold_frame();
self.fudge_factor.x += self.sword.fudge(frame) * self.facing as i32;
self.fudge_factor.x = (self.sword.fudge(frame) * self.facing as i32).into();
let tag = self.sword.attack_tag();
let sprite = controller.sprite(tag.animation_sprite(frame as usize));
self.entity.sprite.set_sprite(sprite);