mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2024-11-21 11:21:06 +00:00
Fix vbsp missing skybox error case when building cubemaps.
The code previoused checked the address of a stack array that would always evaluate non-zero, which wasn't what was intended.
This commit is contained in:
parent
d9ac276a95
commit
6d419a245f
2 changed files with 12 additions and 10 deletions
|
@ -286,12 +286,8 @@ void CreateDefaultCubemaps( bool bHDR )
|
|||
// NOTE: This implementation depends on the fact that all VTF files contain
|
||||
// all mipmap levels
|
||||
const char *pSkyboxBaseName = FindSkyboxMaterialName();
|
||||
char skyboxMaterialName[MAX_PATH];
|
||||
Q_snprintf( skyboxMaterialName, MAX_PATH, "skybox/%s", pSkyboxBaseName );
|
||||
|
||||
IVTFTexture *pSrcVTFTextures[6];
|
||||
|
||||
if( !skyboxMaterialName )
|
||||
if( !pSkyboxBaseName )
|
||||
{
|
||||
if( s_DefaultCubemapNames.Count() )
|
||||
{
|
||||
|
@ -300,6 +296,11 @@ void CreateDefaultCubemaps( bool bHDR )
|
|||
return;
|
||||
}
|
||||
|
||||
char skyboxMaterialName[MAX_PATH];
|
||||
Q_snprintf( skyboxMaterialName, MAX_PATH, "skybox/%s", pSkyboxBaseName );
|
||||
|
||||
IVTFTexture *pSrcVTFTextures[6];
|
||||
|
||||
int unionTextureFlags = 0;
|
||||
if( !LoadSrcVTFFiles( pSrcVTFTextures, skyboxMaterialName, &unionTextureFlags, bHDR ) )
|
||||
{
|
||||
|
|
|
@ -286,12 +286,8 @@ void CreateDefaultCubemaps( bool bHDR )
|
|||
// NOTE: This implementation depends on the fact that all VTF files contain
|
||||
// all mipmap levels
|
||||
const char *pSkyboxBaseName = FindSkyboxMaterialName();
|
||||
char skyboxMaterialName[MAX_PATH];
|
||||
Q_snprintf( skyboxMaterialName, MAX_PATH, "skybox/%s", pSkyboxBaseName );
|
||||
|
||||
IVTFTexture *pSrcVTFTextures[6];
|
||||
|
||||
if( !skyboxMaterialName )
|
||||
if( !pSkyboxBaseName )
|
||||
{
|
||||
if( s_DefaultCubemapNames.Count() )
|
||||
{
|
||||
|
@ -300,6 +296,11 @@ void CreateDefaultCubemaps( bool bHDR )
|
|||
return;
|
||||
}
|
||||
|
||||
char skyboxMaterialName[MAX_PATH];
|
||||
Q_snprintf( skyboxMaterialName, MAX_PATH, "skybox/%s", pSkyboxBaseName );
|
||||
|
||||
IVTFTexture *pSrcVTFTextures[6];
|
||||
|
||||
int unionTextureFlags = 0;
|
||||
if( !LoadSrcVTFFiles( pSrcVTFTextures, skyboxMaterialName, &unionTextureFlags, bHDR ) )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue