Skip to content

Commit

Permalink
Fix cases of code compilation changing GMS2 version to 2023.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobby233Liu committed Oct 4, 2024
1 parent 3c6f7f7 commit af7bf96
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions UndertaleModLib/UndertaleChunks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2211,7 +2211,8 @@ private void CheckPsemVersion(UndertaleReader reader)
// Fortunately, consistent padding means we need no parsing here
if (Length == 0xF8)
{
reader.undertaleData.SetGMS2Version(2023, 8);
if (!reader.undertaleData.IsVersionAtLeast(2023, 8))
reader.undertaleData.SetGMS2Version(2023, 8);
}
else if (Length == 0xD8)
{
Expand Down Expand Up @@ -2241,7 +2242,8 @@ private void CheckPsemVersion(UndertaleReader reader)
uint secondPtr = reader.ReadUInt32();
if (secondPtr - firstPtr == 0xEC)
{
reader.undertaleData.SetGMS2Version(2023, 8);
if (!reader.undertaleData.IsVersionAtLeast(2023, 8))
reader.undertaleData.SetGMS2Version(2023, 8);
}
else if (secondPtr - firstPtr == 0xC0)
{
Expand Down

0 comments on commit af7bf96

Please sign in to comment.