Skip to content

Commit c5a1003

Browse files
committed
Fixes for recent Smite compression changes
1 parent 3fcebd4 commit c5a1003

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

Unreal/UnCore.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2471,11 +2471,6 @@ struct FIntBulkData : public FByteBulkData
24712471
#define COMPRESS_LZO_ENC_BNS 8 // encrypted LZO
24722472
#endif
24732473

2474-
#if SMITE
2475-
#define COMPRESS_LZO_ENC_SMITE 514 // encrypted LZO
2476-
#define COMPRESS_OODLE_SMITE 8
2477-
#endif
2478-
24792474
#if USE_LZ4
24802475
#define COMPRESS_LZ4 0xFE // custom umodel's constant
24812476
#endif

Unreal/UnCoreCompression.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -212,16 +212,17 @@ int appDecompress(byte *CompressedBuffer, int CompressedSize, byte *Uncompressed
212212
#if SMITE
213213
if (GForceGame == GAME_Smite)
214214
{
215-
if (Flags == COMPRESS_LZO_ENC_SMITE)
215+
if (Flags & 512)
216216
{
217+
// Simple encryption
217218
for (int i = 0; i < CompressedSize; i++)
218219
CompressedBuffer[i] ^= 0x2A;
219-
// overide compression
220-
Flags = COMPRESS_LZO;
220+
// Remove encryption flag
221+
Flags &= ~512;
221222
}
222-
else if (Flags == COMPRESS_OODLE_SMITE)
223+
if (Flags == 8)
223224
{
224-
// overide compression
225+
// Overide compression, appeared in late 2019 builds
225226
Flags = COMPRESS_OODLE;
226227
}
227228
}

0 commit comments

Comments
 (0)