Skip to content

Commit

Permalink
Merge pull request #13 from aglab2/master
Browse files Browse the repository at this point in the history
Added try-catch to support more ROMs with malformed 22 cmds
  • Loading branch information
DavidSM64 authored Jul 10, 2018
2 parents 655ecba + 35f1345 commit 4cfbc19
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 4cfbc19

Please sign in to comment.