mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
fixed teams on older versions
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user