From a8e2b45074d5f3cd3bdfb1740cd0bee1dfae3277 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Fri, 7 Feb 2025 21:31:01 +0100 Subject: line up option --- client/src/audio.rs | 13 ++++++------- world/src/main.rs | 8 +++++++- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/client/src/audio.rs b/client/src/audio.rs index dca9cb4..ff9dc1a 100644 --- a/client/src/audio.rs +++ b/client/src/audio.rs @@ -14,13 +14,6 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -use std::{ - collections::{HashMap, VecDeque}, - env::var, - sync::mpsc::{Receiver, SyncSender, sync_channel}, - time::Instant, -}; - use anyhow::{Result, anyhow}; use audiopus::{ Application, Channels, SampleRate, @@ -33,6 +26,12 @@ use cpal::{ use glam::Vec3; use log::{debug, info, warn}; use nnnoiseless::{DenoiseState, RnnModel}; +use std::{ + collections::{HashMap, VecDeque}, + env::var, + sync::mpsc::{Receiver, SyncSender, sync_channel}, + time::Instant, +}; pub struct Audio { _instream: Option, diff --git a/world/src/main.rs b/world/src/main.rs index c3fb959..278cfb3 100644 --- a/world/src/main.rs +++ b/world/src/main.rs @@ -80,6 +80,8 @@ pub struct Args { scale: Option, #[arg(short, long)] dry_run: bool, + #[arg(short, long)] + line_up: bool, #[arg(long)] use_cache: bool, @@ -312,10 +314,14 @@ fn main() -> Result<()> { let mut obs = Vec::new(); if args.add { - for p in &prefabs { + for (i, p) in prefabs.iter().enumerate() { let ob = Object::new(); info!("adding object {ob}"); Packet::Add(ob, p.clone()).write(&mut sock)?; + if args.line_up { + Packet::Position(ob, vec3a(i as f32, 0., i as f32 * 0.3), Vec3A::ZERO) + .write(&mut sock)?; + } obs.push(ob); } sock.flush()?; -- cgit v1.2.3-70-g09d2