Merge pull request #93 from Rackover/generate_standard_zones

Unless explicitely defined, do not generate iw4x specific zones
This commit is contained in:
Dss0 2021-07-14 18:54:48 +02:00 committed by GitHub
commit 80effffd09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -378,7 +378,7 @@ namespace Components
Game::XFileHeader header = Game::XFileHeader header =
{ {
#ifdef DEBUG #ifndef GENERATE_IW4X_SPECIFIC_ZONES
XFILE_MAGIC_UNSIGNED, XFILE_MAGIC_UNSIGNED,
#else #else
XFILE_HEADER_IW4X | (static_cast<unsigned __int64>(XFILE_VERSION_IW4X) << 32), XFILE_HEADER_IW4X | (static_cast<unsigned __int64>(XFILE_VERSION_IW4X) << 32),
@ -394,7 +394,7 @@ namespace Components
std::string zoneBuffer = this->buffer.toBuffer(); std::string zoneBuffer = this->buffer.toBuffer();
#ifndef DEBUG #ifdef GENERATE_IW4X_SPECIFIC_ZONES
// Insert a random byte, this will destroy the whole alignment and result in a crash, if not handled // Insert a random byte, this will destroy the whole alignment and result in a crash, if not handled
zoneBuffer.insert(zoneBuffer.begin(), static_cast<char>(Utils::Cryptography::Rand::GenerateInt())); zoneBuffer.insert(zoneBuffer.begin(), static_cast<char>(Utils::Cryptography::Rand::GenerateInt()));