Skip to content

Commit

Permalink
Merge branch 'staging'
Browse files Browse the repository at this point in the history
  • Loading branch information
MattFiler committed Oct 24, 2024
2 parents c6e2ba4 + 1a8a75f commit 2098538
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
6 changes: 3 additions & 3 deletions CathodeLib/CathodeLib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
<Authors>Matt Filer</Authors>
<Description>Provides support for parsing and writing common Alien: Isolation formats from the Cathode engine.</Description>
<Copyright>Matt Filer 2024</Copyright>
<Version>0.7.0</Version>
<Version>0.7.1</Version>
<OutputType>Library</OutputType>
<AssemblyVersion>0.7.0.0</AssemblyVersion>
<FileVersion>0.6.0.0</FileVersion>
<AssemblyVersion>0.7.1.0</AssemblyVersion>
<FileVersion>0.7.1.0</FileVersion>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
</PropertyGroup>

Expand Down
11 changes: 3 additions & 8 deletions CathodeLib/Scripts/CATHODE/CommandsPAK/Components/Entity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -799,16 +799,11 @@ public ShortGuid GeneratePathHash()
if (path.Length == 0) return ShortGuid.Invalid;
EnsureFinalIsEmpty();

//TODO: invert loop rather than array
path.Reverse();
ShortGuid checksumGenerated = path[0];
for (int i = 0; i < path.Length; i++)
ShortGuid checksumGenerated = path[path.Length - 2];
for (int i = path.Length - 2; i >= 1; i--)
{
checksumGenerated = checksumGenerated.Combine(path[i + 1]);
if (i == path.Length - 2) break;
checksumGenerated = checksumGenerated.Combine(path[i - 1]);
}
path.Reverse();

return checksumGenerated;
}

Expand Down

0 comments on commit 2098538

Please sign in to comment.