Skip to content

Commit

Permalink
Added try-catch to support more ROMs with malformed 22 cmds
Browse files Browse the repository at this point in the history
  • Loading branch information
aglab2 committed Jul 10, 2018
1 parent 5e916c6 commit 35f1345
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Scripts/LevelScripts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,12 @@ private static void CMD_22(ref Level lvl, ref string desc, byte[] cmd)
lvl.AddObjectCombos(modelID, newModel.GeoDataSegAddress);
if (rom.getSegment(seg) != null)
{
GeoScripts.resetNodes();
GeoScripts.parse(ref newModel, ref lvl, seg, off);
try
{
GeoScripts.resetNodes();
GeoScripts.parse(ref newModel, ref lvl, seg, off);
}
catch (Exception) { }
}
if (lvl.ModelIDs.ContainsKey(modelID))
lvl.ModelIDs.Remove(modelID);
Expand Down

0 comments on commit 35f1345

Please sign in to comment.