feat: stabilize OpenSim interactions and landmarks
Some checks failed
CI / rust-skia (Rust only) (push) Has been cancelled
CI / required (push) Has been cancelled

This commit is contained in:
2026-08-21 22:46:10 +02:00
parent adf5165033
commit e4e84dcdcb
27 changed files with 536 additions and 101 deletions

View File

@@ -1743,10 +1743,17 @@ fn append_packet_impls(body: &mut String, packets: &[&PacketDefinition]) {
);
}
BlockRepetition::Variable => {
let _ = writeln!(
body,
" let {field_name}_count = usize::from(reader.read_u8()?);"
);
if packet.name == "ImprovedInstantMessage" && block.name == "MetaData" {
let _ = writeln!(
body,
" let {field_name}_count = if reader.is_empty() {{ 0 }} else {{ usize::from(reader.read_u8()?) }};"
);
} else {
let _ = writeln!(
body,
" let {field_name}_count = usize::from(reader.read_u8()?);"
);
}
let _ = writeln!(body, " let mut {field_name} = Vec::new();");
let _ = writeln!(
body,