2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-10 18:27:41 +00:00

Actually implement AssetNameMap in DNAMP1

This commit is contained in:
2020-04-22 03:37:34 -07:00
parent 535717fbd8
commit 59f979db67
7 changed files with 30 additions and 18 deletions

View File

@@ -140,7 +140,7 @@ void CScriptPickupGenerator::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId
float r = stateMgr.GetActiveRandom()->Range(0.f, totalProb);
float f2 = 0.f;
size_t count = 0;
for (const auto id : pickupTemplates) {
for (const auto& id : pickupTemplates) {
if (r >= f2 && r <= f2 + id.first)
break;
f2 += id.first;