mirror of
https://github.com/LazyDuchess/OpenTS2.git
synced 2025-01-22 08:11:47 -05:00
Fix SimAntics unit test
This commit is contained in:
parent
5611766d11
commit
cabc1f12e3
2 changed files with 8 additions and 1 deletions
|
@ -74,6 +74,11 @@ namespace OpenTS2.SimAntics
|
|||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
// If we don't have an exception handler just re-throw to avoid swallowing errors.
|
||||
if (ExceptionHandler == null)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
ExceptionHandler?.Invoke(e, entity);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -113,12 +113,14 @@ namespace OpenTS2.SimAntics
|
|||
public BHAVAsset GetBHAV(ushort treeID)
|
||||
{
|
||||
// 0x0XXX is global scope, 0x1XXX is private scope and 0x2XXX is semiglobal scope.
|
||||
var groupid = SemiGlobalGroupID;
|
||||
uint groupid;
|
||||
|
||||
if (treeID < 0x1000)
|
||||
groupid = GroupIDs.Global;
|
||||
else if (treeID < 0x2000)
|
||||
groupid = PrivateGroupID;
|
||||
else
|
||||
groupid = SemiGlobalGroupID;
|
||||
|
||||
return VM.GetBHAV(treeID, groupid);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue