2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 04:27:42 +00:00

Fix infinite loop in CObjectList, and add an assert to detect invalid assignments

This commit is contained in:
2020-03-07 09:14:07 -08:00
parent 4daa8ac374
commit f06c26e7d6
6 changed files with 29 additions and 17 deletions

View File

@@ -3,8 +3,8 @@
namespace urde {
void CWeaponMgr::Add(TUniqueId uid, EWeaponType type) {
x0_weapons.insert(std::make_pair(uid, rstl::reserved_vector<s32, 10>()));
x0_weapons[uid].resize(10);
x0_weapons.insert(std::make_pair(uid, rstl::reserved_vector<s32, 15>()));
x0_weapons[uid].resize(15);
++x0_weapons[uid][u32(type)];
}