diff options
author | metamuffin <metamuffin@disroot.org> | 2025-02-07 21:31:01 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-02-07 21:31:01 +0100 |
commit | a8e2b45074d5f3cd3bdfb1740cd0bee1dfae3277 (patch) | |
tree | e24176e4fc10e51e2b011c2dc6a91ac76dd5122a | |
parent | 6f2db738f7845b7e75ca2e85b49db0c8b7eee213 (diff) | |
download | weareserver-a8e2b45074d5f3cd3bdfb1740cd0bee1dfae3277.tar weareserver-a8e2b45074d5f3cd3bdfb1740cd0bee1dfae3277.tar.bz2 weareserver-a8e2b45074d5f3cd3bdfb1740cd0bee1dfae3277.tar.zst |
line up option
-rw-r--r-- | client/src/audio.rs | 13 | ||||
-rw-r--r-- | 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 <https://www.gnu.org/licenses/>. */ -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<Stream>, 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<f32>, #[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()?; |