Skip to content

Commit

Permalink
Turns out AmbienceVolume isn't always nil
Browse files Browse the repository at this point in the history
  • Loading branch information
maddymakesgames committed Jul 20, 2024
1 parent ba6329d commit 41db9e1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/src/saves/def/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,11 @@ pub struct Audio {
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct AmbienceVolume {
#[serde(rename(serialize = "@xsi:nil", deserialize = "@nil"))]
pub val: bool,
#[serde(default)]
pub nil: bool,
#[serde(rename = "$text")]
#[serde(skip_serializing_if = "Option::is_none")]
pub val: Option<f32>,
}

#[derive(Serialize, Deserialize, Debug, Clone)]
Expand Down

0 comments on commit 41db9e1

Please sign in to comment.