Skip to content

Commit fac8cd8

Browse files
authored
Merge pull request #44 from Scobalula/development
MW2 Fixes
2 parents fab7d27 + 419739c commit fac8cd8

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/WraithXCOD/WraithXCOD/GameModernWarfare5.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -601,9 +601,9 @@ std::unique_ptr<XSound> GameModernWarfare5::ReadXSound(const CoDSound_t* Sound)
601601
{
602602
// Buffer
603603
std::unique_ptr<uint8_t[]> SoundBuffer = nullptr;
604-
// Extract buffer, these are compressed
604+
// Extract buffer, these are compressed, pad the audio size since the size in sound asset is literal, but XPAK data is padded.
605605
uint32_t SoundMemoryResult = 0;
606-
SoundBuffer = CoDAssets::GamePackageCache->ExtractPackageObject(SoundData.StreamKey, (int32_t)(((uint64_t)SoundData.Size + 4095) & 0xFFFFFFFFFFFFF000), SoundMemoryResult);
606+
SoundBuffer = CoDAssets::GamePackageCache->ExtractPackageObject(SoundData.StreamKey, (int32_t)(((uint64_t)SoundData.Size + (size_t)SoundData.SeekTableSize + 4095) & 0xFFFFFFFFFFFFFFF0), SoundMemoryResult);
607607

608608
if (SoundMemoryResult == 0)
609609
return nullptr;
@@ -617,9 +617,9 @@ std::unique_ptr<XSound> GameModernWarfare5::ReadXSound(const CoDSound_t* Sound)
617617
{
618618
// Buffer
619619
std::unique_ptr<uint8_t[]> SoundBuffer = nullptr;
620-
// Extract buffer, these are compressed
620+
// Extract buffer, these are compressed, pad the audio size since the size in sound asset is literal, but XPAK data is padded.
621621
uint32_t SoundMemoryResult = 0;
622-
SoundBuffer = CoDAssets::GamePackageCache->ExtractPackageObject(SoundData.StreamKeyEx, (int32_t)(((uint64_t)SoundData.LoadedSize + 4095) & 0xFFFFFFFFFFFFF000), SoundMemoryResult);
622+
SoundBuffer = CoDAssets::GamePackageCache->ExtractPackageObject(SoundData.StreamKeyEx, (int32_t)(((uint64_t)SoundData.LoadedSize + (size_t)SoundData.SeekTableSize + 4095) & 0xFFFFFFFFFFFFFFF0), SoundMemoryResult);
623623

624624
if (SoundMemoryResult == 0)
625625
return nullptr;

src/WraithXCOD/WraithXCOD/WraithXCOD.rc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,8 @@ IDI_CHECKMARK ICON "..\\..\\WraithX\\Resources\\Che
348348
//
349349

350350
VS_VERSION_INFO VERSIONINFO
351-
FILEVERSION 1,23,25,0
352-
PRODUCTVERSION 1,23,25,0
351+
FILEVERSION 1,23,27,0
352+
PRODUCTVERSION 1,23,27,0
353353
FILEFLAGSMASK 0x3fL
354354
#ifdef _DEBUG
355355
FILEFLAGS 0x1L
@@ -366,12 +366,12 @@ BEGIN
366366
BEGIN
367367
VALUE "CompanyName", "DTZxPorter / Scobalula"
368368
VALUE "FileDescription", "Greyhound"
369-
VALUE "FileVersion", "1.23.25.0"
369+
VALUE "FileVersion", "1.23.27.0"
370370
VALUE "InternalName", "Greyhound"
371371
VALUE "LegalCopyright", "Copyright (C) 2022 DTZxPorter / Scobalula"
372372
VALUE "OriginalFilename", "Greyhound.exe"
373373
VALUE "ProductName", "Greyhound"
374-
VALUE "ProductVersion", "1.23.25.0"
374+
VALUE "ProductVersion", "1.23.27.0"
375375
END
376376
END
377377
BLOCK "VarFileInfo"

0 commit comments

Comments
 (0)