Fix mutation system debug assert (#32530)

This commit is contained in:
slarticodefast 2024-09-29 23:37:31 +02:00 committed by GitHub
parent f6ceaa7d10
commit 16325007d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -27,7 +27,7 @@ public sealed class MutationSystem : EntitySystem
{
foreach (var mutation in _randomMutations.mutations)
{
if (Random(mutation.BaseOdds * severity))
if (Random(Math.Min(mutation.BaseOdds * severity, 1.0f)))
{
if (mutation.AppliesToPlant)
{