mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
i broke the whole project but its fine
complete pickup rewrite, idle pawns
This commit is contained in:
@@ -69,7 +69,7 @@ static T* PickWeightedElement(const std::map<FName, T*>& Elements, std::function
|
||||
TotalWeight = std::accumulate(Elements.begin(), Elements.end(), 0.0f, [&](float acc, const std::pair<FName, T*>& p) {
|
||||
auto Weight = GetWeightFn(p.second);
|
||||
|
||||
if (bPrint)
|
||||
if (bPrint && Weight != 0)
|
||||
{
|
||||
LOG_INFO(LogLoot, "Adding weight: {}", Weight);
|
||||
}
|
||||
@@ -282,7 +282,7 @@ void PickLootDropsFromLootPackage(const std::vector<UDataTable*>& LPTables, cons
|
||||
return;
|
||||
|
||||
if (bPrint)
|
||||
LOG_INFO(LogLoot, "PickLootDropsFromLootPackage selected package {} with loot package category {} from LootPackageIDMap of size: {}", PickedPackageRowName.ToString(), LootPackageCategory, LootPackageIDMap.size());
|
||||
LOG_INFO(LogLoot, "PickLootDropsFromLootPackage selected package {} with loot package category {} with weight {} from LootPackageIDMap of size: {}", PickedPackageRowName.ToString(), LootPackageCategory, PickedPackage->GetWeight(), LootPackageIDMap.size());
|
||||
|
||||
if (PickedPackage->GetLootPackageCall().Data.Num() > 1)
|
||||
{
|
||||
@@ -358,12 +358,20 @@ void PickLootDropsFromLootPackage(const std::vector<UDataTable*>& LPTables, cons
|
||||
{
|
||||
auto AmmoData = WeaponItemDefinition->GetAmmoData();
|
||||
|
||||
int AmmoCount = AmmoData->GetDropCount(); // idk about this one
|
||||
if (AmmoData)
|
||||
{
|
||||
int AmmoCount = AmmoData->GetDropCount(); // idk about this one
|
||||
|
||||
OutEntries->push_back(LootDrop(FFortItemEntry::MakeItemEntry(WeaponItemDefinition->GetAmmoData(), AmmoCount)));
|
||||
OutEntries->push_back(LootDrop(FFortItemEntry::MakeItemEntry(AmmoData, AmmoCount)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (bPrint)
|
||||
{
|
||||
LOG_INFO(LogLoot, "Adding Item: {}", ItemDefinition->GetPathName());
|
||||
}
|
||||
|
||||
FinalCount -= CurrentCountForEntry;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user