From b0488cf08195676639de38ecc0a4329c738425d8 Mon Sep 17 00:00:00 2001 From: s1lentq Date: Mon, 3 May 2021 00:50:25 +0700 Subject: [PATCH] Outdated maps compatibility 'Q1BSP_VERSION' for dedicated server --- rehlds/HLTV/Core/src/BSPModel.cpp | 7 ++++++- rehlds/engine/crc.cpp | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/rehlds/HLTV/Core/src/BSPModel.cpp b/rehlds/HLTV/Core/src/BSPModel.cpp index 72ff7a2..15f091d 100644 --- a/rehlds/HLTV/Core/src/BSPModel.cpp +++ b/rehlds/HLTV/Core/src/BSPModel.cpp @@ -724,7 +724,12 @@ bool BSPModel::LoadFromBuffer(unsigned int *buffer, int length, const char *name header = (dheader_t *)buffer; i = _LittleLong(header->version); - if (i != HLBSP_VERSION) { + if ( +#ifdef HLTV_FIXES + i != Q1BSP_VERSION && +#endif + i != HLBSP_VERSION) + { m_System->Errorf("BSPModel::LoadFromBuffer: %s has wrong version number (%i should be %i)\n", m_model.name, i, HLBSP_VERSION); } diff --git a/rehlds/engine/crc.cpp b/rehlds/engine/crc.cpp index 6bb1f32..df6f52b 100644 --- a/rehlds/engine/crc.cpp +++ b/rehlds/engine/crc.cpp @@ -227,7 +227,11 @@ int CRC_MapFile(CRC32_t *crcvalue, char *pszFileName) return 0; } i = LittleLong(header.version); - if (i != HLBSP_VERSION) + if ( +#ifdef REHLDS_FIXES + i != Q1BSP_VERSION && +#endif + i != HLBSP_VERSION) { Con_Printf("Map [%s] has incorrect BSP version (%i should be %i).\n", pszFileName, i, HLBSP_VERSION); FS_Close(fp);