more validation
This commit is contained in:
parent
ce8f3ccd6e
commit
d57867e630
1 changed files with 13 additions and 1 deletions
|
@ -135,7 +135,19 @@ async fn omni_inner(state: SharedControl, req: GoogleOmniForm) -> anyhow::Result
|
|||
req.z2.context("z2")?.parse()?,
|
||||
);
|
||||
|
||||
let quarry = Quarry::new(position, upper);
|
||||
let min = Vec3::new(
|
||||
upper.x.min(position.x),
|
||||
upper.y.min(position.y),
|
||||
upper.z.min(position.z),
|
||||
);
|
||||
|
||||
let max = Vec3::new(
|
||||
upper.x.max(position.x),
|
||||
upper.y.max(position.y),
|
||||
upper.z.max(position.z),
|
||||
);
|
||||
|
||||
let quarry = Quarry::new(min, max);
|
||||
schedule.add_task(Box::new(quarry));
|
||||
},
|
||||
GoogleOmniFormMode::Goto => {
|
||||
|
|
Loading…
Reference in a new issue