@@ -1093,7 +1093,7 @@ public void SaveToFile(string filePath, Action<bool, string> loggingFunction = n
1093
1093
/// </summary>
1094
1094
/// <param name="filePath"></param>
1095
1095
/// <param name="loggingFunction"></param>
1096
- public void SaveFullToFile ( string filePath , Action < bool , string > loggingFunction = null )
1096
+ public void SaveFullToFile ( string filePath , string raceId , Action < bool , string > loggingFunction = null )
1097
1097
{
1098
1098
if ( loggingFunction == null )
1099
1099
{
@@ -1107,7 +1107,7 @@ public void SaveFullToFile(string filePath, Action<bool, string> loggingFunction
1107
1107
var connectionString = "Data Source=" + filePath + ";Pooling=False;" ;
1108
1108
try
1109
1109
{
1110
- var boneDict = ResolveBoneHeirarchy ( ) ;
1110
+ var boneDict = ResolveBoneHeirarchy ( loggingFunction , raceId ) ;
1111
1111
1112
1112
// Spawn a DB connection to do the raw queries.
1113
1113
// Using statements help ensure we don't accidentally leave any connections open and lock the file handle.
@@ -1501,7 +1501,7 @@ private float[] NewIdentityMatrix()
1501
1501
/// Used when saving the file to DB. (Or potentially animating it)
1502
1502
/// </summary>
1503
1503
/// <returns></returns>
1504
- private Dictionary < string , SkeletonData > ResolveBoneHeirarchy ( Action < bool , string > loggingFunction = null )
1504
+ private Dictionary < string , SkeletonData > ResolveBoneHeirarchy ( Action < bool , string > loggingFunction = null , string raceId = "" )
1505
1505
{
1506
1506
if ( loggingFunction == null )
1507
1507
{
@@ -1511,13 +1511,17 @@ private Dictionary<string, SkeletonData> ResolveBoneHeirarchy(Action<bool, strin
1511
1511
var fullSkel = new Dictionary < string , SkeletonData > ( ) ;
1512
1512
var skelDict = new Dictionary < string , SkeletonData > ( ) ;
1513
1513
1514
- var skelName = Sklb . GetParsedSkelFilename ( Source ) ;
1515
- if ( skelName == null )
1514
+ var skelName = raceId ;
1515
+
1516
+ if ( string . IsNullOrEmpty ( raceId ) )
1516
1517
{
1517
- return skelDict ;
1518
+ skelName = Sklb . GetParsedSkelFilename ( Source ) ;
1519
+ if ( skelName == null )
1520
+ {
1521
+ return skelDict ;
1522
+ }
1518
1523
}
1519
1524
1520
-
1521
1525
var cwd = System . IO . Path . GetDirectoryName ( System . Reflection . Assembly . GetEntryAssembly ( ) . Location ) ;
1522
1526
var skeletonFile = cwd + "/Skeletons/" + skelName + ".skel" ;
1523
1527
var skeletonData = File . ReadAllLines ( skeletonFile ) ;
0 commit comments