(9f9b86b9b) Fixed tutorial level generation params being used in normal levels.

This commit is contained in:
Joonas Rikkonen
2019-05-03 13:50:49 +03:00
parent c7a71d5627
commit 8c678e3977
5 changed files with 77 additions and 218 deletions
@@ -1,4 +1,5 @@
using Microsoft.Xna.Framework;
using Barotrauma.Extensions;
using Microsoft.Xna.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -368,7 +369,7 @@ namespace Barotrauma
if (biome == null)
{
return levelParams[Rand.Range(0, levelParams.Count, Rand.RandSync.Server)];
return levelParams.GetRandom(lp => lp.allowedBiomes.Count > 0, Rand.RandSync.Server);
}
var matchingLevelParams = levelParams.FindAll(lp => lp.allowedBiomes.Contains(biome));