mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
clippyyyyy
This commit is contained in:
parent
7a1612aa8a
commit
96a70d760c
@ -325,7 +325,9 @@ impl Rule for NpcAi {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn idle<S: State>() -> impl Action<S> + Clone { just(|ctx, _| ctx.controller.do_idle()).debug(|| "idle") }
|
fn idle<S: State>() -> impl Action<S> + Clone {
|
||||||
|
just(|ctx, _| ctx.controller.do_idle()).debug(|| "idle")
|
||||||
|
}
|
||||||
|
|
||||||
/// Try to walk toward a 3D position without caring for obstacles.
|
/// Try to walk toward a 3D position without caring for obstacles.
|
||||||
fn goto<S: State>(wpos: Vec3<f32>, speed_factor: f32, goal_dist: f32) -> impl Action<S> {
|
fn goto<S: State>(wpos: Vec3<f32>, speed_factor: f32, goal_dist: f32) -> impl Action<S> {
|
||||||
|
@ -302,7 +302,7 @@ impl Tavern {
|
|||||||
min: aabr.min - amount,
|
min: aabr.min - amount,
|
||||||
max: aabr.max + amount,
|
max: aabr.max + amount,
|
||||||
};
|
};
|
||||||
'room_gen: while room_metas.len() > 0 {
|
'room_gen: while !room_metas.is_empty() {
|
||||||
// Continue extending from a random existing room
|
// Continue extending from a random existing room
|
||||||
let mut room_meta = room_metas.swap_remove(rng.gen_range(0..room_metas.len()));
|
let mut room_meta = room_metas.swap_remove(rng.gen_range(0..room_metas.len()));
|
||||||
if room_meta.walls.is_empty() {
|
if room_meta.walls.is_empty() {
|
||||||
@ -683,10 +683,8 @@ impl Tavern {
|
|||||||
continue 'y_loop;
|
continue 'y_loop;
|
||||||
}
|
}
|
||||||
|
|
||||||
if contains_x && min.y < area.min.y {
|
if contains_x && min.y < area.min.y && area.min.y - 1 < max_y {
|
||||||
if area.min.y - 1 < max_y {
|
max_y = area.min.y - 1;
|
||||||
max_y = area.min.y - 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user