From ae0b86c7b91e75c90d835c2c75e1e30745d798e3 Mon Sep 17 00:00:00 2001 From: Corwin <corwin@kuiper.dev> Date: Mon, 28 Aug 2023 11:36:22 +0100 Subject: [PATCH] fix lints --- .../src/game/simulation/animation.rs | 2 +- .../src/game/simulation/entity.rs | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/examples/the-dungeon-puzzlers-lament/src/game/simulation/animation.rs b/examples/the-dungeon-puzzlers-lament/src/game/simulation/animation.rs index 025ea47e..21141c09 100644 --- a/examples/the-dungeon-puzzlers-lament/src/game/simulation/animation.rs +++ b/examples/the-dungeon-puzzlers-lament/src/game/simulation/animation.rs @@ -54,7 +54,7 @@ impl ToPlay { } AnimationInstruction::FakeOutMove(e, d, p, s) => { self.fakeout - .push(FakeOutMove(e, d, p.map(|p| convert_to_real_space(p)), s)) + .push(FakeOutMove(e, d, p.map(convert_to_real_space), s)) } AnimationInstruction::Detatch(e, nk, s) => self.detatch.push(Detatch(e, nk, s)), AnimationInstruction::Attach(e, o, s) => { diff --git a/examples/the-dungeon-puzzlers-lament/src/game/simulation/entity.rs b/examples/the-dungeon-puzzlers-lament/src/game/simulation/entity.rs index 09541d5c..bb343820 100644 --- a/examples/the-dungeon-puzzlers-lament/src/game/simulation/entity.rs +++ b/examples/the-dungeon-puzzlers-lament/src/game/simulation/entity.rs @@ -89,7 +89,6 @@ impl EntityMap { &mut self, map: &Map, animations: &mut Vec<AnimationInstruction>, - entities_to_try_update: &mut VecDeque<(EntityKey, Action)>, entity_to_update_key: EntityKey, direction: Direction, can_turn_around: bool, @@ -150,7 +149,6 @@ impl EntityMap { self.attempt_move_in_direction( map, animations, - entities_to_try_update, other_entity_key, direction, true, @@ -250,8 +248,14 @@ impl EntityMap { break; } OverlapResolution::MoveAgain => { - entities_to_try_update - .push_front((entity_to_update_key, Action::Direction(direction))); + self.attempt_move_in_direction( + map, + animations, + other_entity_key, + direction, + false, + push_depth, + ); } } } @@ -273,7 +277,6 @@ impl EntityMap { return self.attempt_move_in_direction( map, animations, - entities_to_try_update, entity_to_update_key, -direction, false, @@ -323,7 +326,6 @@ impl EntityMap { .attempt_move_in_direction( map, &mut animations, - &mut entities_to_try_update, entity_to_update_key, direction, true,