summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-01-28 18:03:18 +0100
committermetamuffin <metamuffin@disroot.org>2025-01-28 18:03:18 +0100
commit163e10c9f618f0e4cd7b4456476ad1c2322db5d7 (patch)
tree7508f80014e96d89d2352ee946580f5f2ba599f8
parent58e3531cd2316e9c73b01221d68834592ad6a2ff (diff)
downloadweareserver-163e10c9f618f0e4cd7b4456476ad1c2322db5d7.tar
weareserver-163e10c9f618f0e4cd7b4456476ad1c2322db5d7.tar.bz2
weareserver-163e10c9f618f0e4cd7b4456476ad1c2322db5d7.tar.zst
fix use-cache and armature key
-rw-r--r--shared/src/resources.rs2
-rw-r--r--world/src/main.rs10
2 files changed, 7 insertions, 5 deletions
diff --git a/shared/src/resources.rs b/shared/src/resources.rs
index 1dc326e..c96621d 100644
--- a/shared/src/resources.rs
+++ b/shared/src/resources.rs
@@ -264,6 +264,7 @@ impl ReadWrite for MeshPart {
fn write(&self, w: &mut dyn Write) -> Result<()> {
write_kv_opt(w, b"name", &self.name)?;
write_kv_opt(w, b"index", &self.index)?;
+ write_kv_opt(w, b"armature", &self.armature)?;
write_kv_opt(w, b"g_metallic", &self.g_metallic)?;
write_kv_opt(w, b"g_roughness", &self.g_roughness)?;
write_kv_opt(w, b"g_albedo", &self.g_albedo)?;
@@ -301,6 +302,7 @@ impl ReadWrite for MeshPart {
read_kv_iter(r, |k, v| match k {
b"name" => Ok(s.name = Some(read_slice(v)?)),
b"index" => Ok(s.index = Some(read_slice(v)?)),
+ b"armature" => Ok(s.armature = Some(read_slice(v)?)),
b"g_metallic" => Ok(s.g_metallic = Some(read_slice(v)?)),
b"g_roughness" => Ok(s.g_roughness = Some(read_slice(v)?)),
b"g_albedo" => Ok(s.g_albedo = Some(read_slice(v)?)),
diff --git a/world/src/main.rs b/world/src/main.rs
index c65342f..b0b9dad 100644
--- a/world/src/main.rs
+++ b/world/src/main.rs
@@ -82,7 +82,7 @@ pub struct Args {
dry_run: bool,
#[arg(long)]
- put_cache: bool,
+ use_cache: bool,
#[arg(long)]
debug_light: bool,
@@ -92,7 +92,7 @@ fn main() -> Result<()> {
env_logger::init_from_env("LOG");
let args = Args::parse();
- let store = if args.put_cache {
+ let store = if args.use_cache {
ResourceStore::new_env()?
} else {
ResourceStore::new_memory()
@@ -300,10 +300,10 @@ fn main() -> Result<()> {
});
}
- if args.put_cache {
- return Ok(());
- }
if args.push {
+ if args.use_cache {
+ return Ok(());
+ }
store.iter(|k, _| {
Packet::RespondResource(k, Data(store.get_raw(k).unwrap().unwrap()))
.write(&mut sock)