]> git.localhorst.tv Git - blobs.git/blobdiff - src/creature/goal.cpp
color mutation
[blobs.git] / src / creature / goal.cpp
index 82ec757038f682354e8f5a11def83216dc830953..a4f33304f3f75af56b86c376b0c653879405006e 100644 (file)
@@ -111,7 +111,7 @@ void BlobBackgroundTask::CheckMutate() {
        // check for random property mutation
        if (GetCreature().MutateChance() > Assets().random.UNorm()) {
                double amount = 1.0 + (Assets().random.SNorm() * 0.05);
-               math::Distribution &d = GetCreature().GetGenome().properties.props[(int(Assets().random.UNorm() * 8.0) % 8)];
+               math::Distribution &d = GetCreature().GetGenome().properties.props[Assets().random.UInt(9)];
                if (Assets().random.UNorm() < 0.5) {
                        d.Mean(d.Mean() * amount);
                } else {