summaryrefslogtreecommitdiff
path: root/client/src
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-01-07 15:33:42 +0100
committermetamuffin <metamuffin@disroot.org>2025-01-07 15:33:42 +0100
commit9af9fc6e9981fbb582fad9f69ad6bb0d96856b5e (patch)
tree7321528247a9f56776faff9de4c9c8fd97a1e531 /client/src
parent4065dbe5b73839d4d3ed45a30bcc466ea414f3b5 (diff)
downloadweareserver-9af9fc6e9981fbb582fad9f69ad6bb0d96856b5e.tar
weareserver-9af9fc6e9981fbb582fad9f69ad6bb0d96856b5e.tar.bz2
weareserver-9af9fc6e9981fbb582fad9f69ad6bb0d96856b5e.tar.zst
remove pbr prefix
Diffstat (limited to 'client/src')
-rw-r--r--client/src/scene_prepare.rs2
-rw-r--r--client/src/window.rs10
2 files changed, 10 insertions, 2 deletions
diff --git a/client/src/scene_prepare.rs b/client/src/scene_prepare.rs
index fcc7932..6d50035 100644
--- a/client/src/scene_prepare.rs
+++ b/client/src/scene_prepare.rs
@@ -222,7 +222,7 @@ impl ScenePreparer {
}
}
let mut texture = None;
- if let Some(albedores) = part.tex_pbr_albedo {
+ if let Some(albedores) = part.tex_albedo {
if let Some((_tex, bg)) = self.textures.try_get(albedores) {
texture = Some(bg)
}
diff --git a/client/src/window.rs b/client/src/window.rs
index ac90f71..8b3ee9e 100644
--- a/client/src/window.rs
+++ b/client/src/window.rs
@@ -7,7 +7,7 @@ use winit::{
event::{DeviceEvent, ElementState, WindowEvent},
event_loop::ActiveEventLoop,
keyboard::{KeyCode, PhysicalKey},
- window::{Window, WindowAttributes, WindowId},
+ window::{CursorGrabMode, Window, WindowAttributes, WindowId},
};
pub struct WindowState {
@@ -53,6 +53,14 @@ impl ApplicationHandler for WindowState {
if event.repeat {
return;
}
+ if event.state == ElementState::Pressed {
+ match event.physical_key {
+ PhysicalKey::Code(KeyCode::Escape) => {
+ win.set_cursor_grab(CursorGrabMode::Locked).unwrap();
+ }
+ _ => (),
+ }
+ }
sta.delta.move_dir += match event.physical_key {
PhysicalKey::Code(KeyCode::KeyW) => Vec3::X,
PhysicalKey::Code(KeyCode::KeyS) => Vec3::NEG_X,