diff options
| author | Jonas 'Sortie' Termansen <[email protected]> | 2013-08-11 13:20:37 +0200 |
|---|---|---|
| committer | Jonas 'Sortie' Termansen <[email protected]> | 2013-08-12 22:42:10 +0200 |
| commit | 6d419a245f8eb266c1a3521ad0540a7b6e3ae6f6 (patch) | |
| tree | 6938a5b3f8ac179c1d3646145c4830edf2ab4f06 /sp | |
| parent | Added bloom shader and screenspace effect helpers as examples for the SDK. (diff) | |
| download | source-sdk-2013-6d419a245f8eb266c1a3521ad0540a7b6e3ae6f6.tar.xz source-sdk-2013-6d419a245f8eb266c1a3521ad0540a7b6e3ae6f6.zip | |
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.
Diffstat (limited to 'sp')
| -rw-r--r-- | sp/src/utils/vbsp/cubemap.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sp/src/utils/vbsp/cubemap.cpp b/sp/src/utils/vbsp/cubemap.cpp index fda41703..2415115b 100644 --- a/sp/src/utils/vbsp/cubemap.cpp +++ b/sp/src/utils/vbsp/cubemap.cpp @@ -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 ) )
{
|