v1.0.13.1 (first post-1.0 patch)
This commit is contained in:
@@ -394,7 +394,6 @@ namespace Barotrauma
|
||||
return SelectWeightedRandom(objects, weightMethod, Rand.GetRNG(randSync));
|
||||
}
|
||||
|
||||
|
||||
public static T SelectWeightedRandom<T>(IEnumerable<T> objects, Func<T, float> weightMethod, Random random)
|
||||
{
|
||||
List<T> objectList = objects.ToList();
|
||||
@@ -409,7 +408,7 @@ namespace Barotrauma
|
||||
|
||||
public static T SelectWeightedRandom<T>(IList<T> objects, IList<float> weights, Random random)
|
||||
{
|
||||
if (objects.Count == 0) return default(T);
|
||||
if (objects.Count == 0) { return default(T); }
|
||||
|
||||
if (objects.Count != weights.Count)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user