FModel v4.0.2

This commit is contained in:
iAmAsval 2021-09-19 22:35:04 +02:00
parent 17a1b0b69b
commit f2f6fc01d2
2 changed files with 11 additions and 13 deletions

@ -1 +1 @@
Subproject commit 4736f8231f61631ffbc5afbd2b4a1281b8651be5
Subproject commit 6d911668e730b3f4c1eab0b3f7e9a99bc3dde943

View File

@ -962,8 +962,7 @@ namespace FModel.ViewModels
private void DrawCubeMovements(SKCanvas c, UObject staticPath, bool fixLocation)
{
if (!staticPath.TryGetValue(out FStructFallback[] pathTravelers, "PathTravelers") || pathTravelers.Length < 1 ||
!pathTravelers[0].TryGetValue(out FPackageIndex[] generatedSplinesArray, "GeneratedSplinesArray") || generatedSplinesArray.Length < 1 ||
!pathTravelers[0].TryGetValue(out FStructFallback[] stepMetaData, "StepMetaData") || stepMetaData.Length < 1)
!pathTravelers[0].TryGetValue(out FPackageIndex[] generatedSplinesArray, "GeneratedSplinesArray") || generatedSplinesArray.Length < 1)
return;
UObject uObject;
@ -980,21 +979,20 @@ namespace FModel.ViewModels
var bDone = false;
var path = new SKPath();
for (var i = 0; i < generatedSplinesArray.Length; i++)
foreach (var generatedSpline in generatedSplinesArray)
{
if (!stepMetaData[i].TryGetValue(out bool bSkipStep, "bSkipStep") || bSkipStep ||
!Utils.TryGetPackageIndexExport(generatedSplinesArray[i], out uObject) ||
if (!Utils.TryGetPackageIndexExport(generatedSpline, out uObject) ||
!uObject.TryGetValue(out FVector relativeLocation, "RelativeLocation")) continue;
if (!uObject.TryGetValue(out FStructFallback splineCurves, "SplineCurves") ||
!splineCurves.TryGetValue(out FStructFallback positions, "Position") ||
!positions.TryGetValue(out FStructFallback[] positionPoints, "Points")) continue;
for (var j = 0; j < positionPoints.Length; j++)
foreach (var positionPoint in positionPoints)
{
if (!positionPoints[j].TryGetValue(out FVector position, "OutVal")) continue;
if (!positionPoint.TryGetValue(out FVector point, "OutVal")) continue;
var vector = GetMapPosition(parentRelativeLocation + relativeLocation + position, _brRadius);
var vector = GetMapPosition(parentRelativeLocation + relativeLocation + point, _brRadius);
if (!bDone)
{
path.MoveTo(vector.X, vector.Y);