Skip to content

Commit 2098538

Browse files
committed
Merge branch 'staging'
2 parents c6e2ba4 + 1a8a75f commit 2098538

2 files changed

Lines changed: 6 additions & 11 deletions

File tree

CathodeLib/CathodeLib.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
<Authors>Matt Filer</Authors>
1111
<Description>Provides support for parsing and writing common Alien: Isolation formats from the Cathode engine.</Description>
1212
<Copyright>Matt Filer 2024</Copyright>
13-
<Version>0.7.0</Version>
13+
<Version>0.7.1</Version>
1414
<OutputType>Library</OutputType>
15-
<AssemblyVersion>0.7.0.0</AssemblyVersion>
16-
<FileVersion>0.6.0.0</FileVersion>
15+
<AssemblyVersion>0.7.1.0</AssemblyVersion>
16+
<FileVersion>0.7.1.0</FileVersion>
1717
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
1818
</PropertyGroup>
1919

CathodeLib/Scripts/CATHODE/CommandsPAK/Components/Entity.cs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -799,16 +799,11 @@ public ShortGuid GeneratePathHash()
799799
if (path.Length == 0) return ShortGuid.Invalid;
800800
EnsureFinalIsEmpty();
801801

802-
//TODO: invert loop rather than array
803-
path.Reverse();
804-
ShortGuid checksumGenerated = path[0];
805-
for (int i = 0; i < path.Length; i++)
802+
ShortGuid checksumGenerated = path[path.Length - 2];
803+
for (int i = path.Length - 2; i >= 1; i--)
806804
{
807-
checksumGenerated = checksumGenerated.Combine(path[i + 1]);
808-
if (i == path.Length - 2) break;
805+
checksumGenerated = checksumGenerated.Combine(path[i - 1]);
809806
}
810-
path.Reverse();
811-
812807
return checksumGenerated;
813808
}
814809

0 commit comments

Comments
 (0)