fixed bsp 20 compatibility

This commit is contained in:
Fisual
2021-12-06 19:06:10 +07:00
parent d18a4d4b1c
commit af90a10c49
5 changed files with 677 additions and 207 deletions

View File

@@ -418,6 +418,8 @@ int CMapLoadHelper::GetRefCount()
return s_nMapLoadRecursion;
}
int bspver;
//-----------------------------------------------------------------------------
// Setup a BSP loading context, maintains a ref count.
//-----------------------------------------------------------------------------
@@ -481,6 +483,8 @@ void CMapLoadHelper::Init( model_t *pMapModel, const char *loadname )
InitDLightGlobals( s_MapHeader.version );
#endif
bspver = s_MapHeader.version;
s_pMap = &g_ModelLoader.m_worldBrushData;
// lump_t fix for l4d2 maps
@@ -549,6 +553,11 @@ void CMapLoadHelper::Init( model_t *pMapModel, const char *loadname )
#endif
}
int GetBSPVersion()
{
return bspver;
}
//-----------------------------------------------------------------------------
// Setup a BSP loading context from a supplied buffer
//-----------------------------------------------------------------------------
@@ -1225,7 +1234,7 @@ void Mod_LoadWorldlights( CMapLoadHelper &lh, bool bIsHDR )
break;
}
}
}
#if !defined( SWDS )
if ( r_lightcache_zbuffercache.GetInt() )
{