2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-10 02: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

@@ -44,8 +44,8 @@ void CScriptBeam::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CSt
x154_projectileId = mgr.AllocateUniqueId();
mgr.AddObject(new CPlasmaProjectile(xe8_weaponDescription, x10_name + "-Projectile",
x138_damageInfo.GetWeaponMode().GetType(), xf4_beamInfo, x34_transform,
EMaterialTypes::Projectile, x138_damageInfo, x8_uid, x4_areaId,
x154_projectileId, {}, false, EProjectileAttrib::PlasmaProjectile));
EMaterialTypes::Projectile, x138_damageInfo, x154_projectileId, x4_areaId,
GetUniqueId(), {}, false, EProjectileAttrib::PlasmaProjectile));
} else if (msg == EScriptObjectMessage::Deleted) {
mgr.FreeScriptObject(x154_projectileId);
}