Use sum instead of fold.

This commit is contained in:
holychowders 2022-05-06 15:46:09 -05:00
parent 1ebbf335e1
commit 4c76e9314d

View File

@ -1196,7 +1196,7 @@ pub fn stealth_multiplier_from_items(inventory: Option<&Inventory>) -> f32 {
None
}
})
.fold(0.0, |a, b| a + b)
.sum()
});
(1.0 / (1.0 + stealth_sum)).clamp(0.0, 1.0)