fixed teams on older versions

This commit is contained in:
Milxnor
2023-06-20 09:39:33 -04:00
parent 779c932b3f
commit 1d12b8929f
3 changed files with 8 additions and 11 deletions

View File

@@ -144,7 +144,7 @@ template <typename KeyType, typename ValueType>
FORCEINLINE static ValueType PickWeightedElement(const std::map<KeyType, ValueType>& Elements,
std::function<float(ValueType)> GetWeightFn,
std::function<float(float)> RandomFloatGenerator = RandomFloatForLoot,
float TotalWeightParam = -1, bool bCheckIfWeightIsZero = false, int RandMultiplier = 1, KeyType* OutName = nullptr, bool bPrint = false, bool bKeepGoingUntilWeGetValue = false)
float TotalWeightParam = -1, bool bCheckIfWeightIsZero = false, int RandMultiplier = 1, KeyType* OutName = nullptr, bool bPrint = false, bool bKeepGoingUntilWeGetValue = false, float AHHH = 1)
{
float TotalWeight = TotalWeightParam;
@@ -165,7 +165,7 @@ FORCEINLINE static ValueType PickWeightedElement(const std::map<KeyType, ValueTy
});
}
float RandomNumber = RandMultiplier * RandomFloatGenerator(TotalWeight);
float RandomNumber = RandMultiplier * RandomFloatGenerator(AHHH == -1 ? TotalWeight : AHHH);
if (bPrint)
{