diff options
author | metamuffin <metamuffin@disroot.org> | 2025-01-19 21:14:48 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-01-19 21:14:48 +0100 |
commit | 13aab0b7c8697feae9a933cd9658677d5e868866 (patch) | |
tree | 2a26e96e3d1afe9b39bc9e54bb4d90237953c42c /world/src/main.rs | |
parent | 5ef0fc14d1d12cc5e7cc6a1fb896953d6d668891 (diff) | |
download | weareserver-13aab0b7c8697feae9a933cd9658677d5e868866.tar weareserver-13aab0b7c8697feae9a933cd9658677d5e868866.tar.bz2 weareserver-13aab0b7c8697feae9a933cd9658677d5e868866.tar.zst |
debug light
Diffstat (limited to 'world/src/main.rs')
-rw-r--r-- | world/src/main.rs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/world/src/main.rs b/world/src/main.rs index 8535490..a2d25ca 100644 --- a/world/src/main.rs +++ b/world/src/main.rs @@ -79,6 +79,9 @@ pub struct Args { scale: Option<f32>, #[arg(short, long)] dry_run: bool, + + #[arg(long)] + debug_light: bool, } fn main() -> Result<()> { @@ -185,6 +188,17 @@ fn main() -> Result<()> { .flatten() .map(|n| n.to_owned())); + if args.debug_light { + prefab.light.push(( + vec3a(5., 5., 5.), + store.set(&LightPart { + name: Some("debug light".to_owned()), + emission: Some(vec3a(10., 5., 15.)), + radius: Some(0.3), + })?, + )); + } + prefabs.push(store.set(&prefab)?); } @@ -223,7 +237,7 @@ fn main() -> Result<()> { thread::spawn(move || { let mut x = 0.; loop { - Packet::Position(ob, Vec3A::ZERO, vec3a(x, x * 0.3, x * 0.1)) + Packet::Position(ob, Vec3A::ZERO, vec3a(0., x * 0.1, 0.)) .write(&mut sock2) .unwrap(); sock2.flush().unwrap(); |