fix lints

This commit is contained in:
Corwin 2023-08-28 11:36:22 +01:00
parent 5846a1c024
commit ae0b86c7b9
No known key found for this signature in database
2 changed files with 9 additions and 7 deletions

View file

@ -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) => {

View file

@ -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,