diff options
-rw-r--r-- | shared/src/resources.rs | 2 | ||||
-rw-r--r-- | world/src/main.rs | 10 |
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) |