From 7121bb7c49fcf5b24795c77100cb1ff46097ecb6 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sun, 12 Jan 2025 12:08:56 +0100 Subject: add scale and z_up arguments --- client/src/camera.rs | 2 +- client/src/download.rs | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'client/src') diff --git a/client/src/camera.rs b/client/src/camera.rs index 4006c74..d2d4bda 100644 --- a/client/src/camera.rs +++ b/client/src/camera.rs @@ -47,7 +47,7 @@ impl Camera { Mat3::from_euler(EulerRot::YXZ, self.rot.x, self.rot.y, self.rot.z) } pub fn to_matrix(&self) -> Mat4 { - Mat4::perspective_rh(self.fov, self.aspect, 0.1, 100.) + Mat4::perspective_rh(self.fov, self.aspect, 0.1, 300.) * Mat4::from_mat3(self.rotation_mat().inverse()) * Mat4::from_translation(-self.pos) } diff --git a/client/src/download.rs b/client/src/download.rs index 85cce32..2d61a53 100644 --- a/client/src/download.rs +++ b/client/src/download.rs @@ -84,7 +84,11 @@ impl Downloader { pub fn update(&self, network: &Network) -> Result<()> { let mut state = self.inner.write().unwrap(); let mut new_pending = Vec::new(); - for n in state.need.difference(&state.pending) { + for n in state + .need + .difference(&state.pending) + .take(32 - state.pending.len()) + { network .packet_send .send(Packet::RequestResource(*n)) -- cgit v1.2.3-70-g09d2