mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Use sum
instead of fold
.
This commit is contained in:
parent
1ebbf335e1
commit
4c76e9314d
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user