mirror of
https://bitbucket.org/CPMADevs/cnq3
synced 2024-11-26 22:11:51 +00:00
fixed r_detailTextures 0 messing up shaders
This commit is contained in:
parent
f773d2a783
commit
69d6cdf42b
2 changed files with 6 additions and 4 deletions
|
@ -137,6 +137,8 @@ chg: r_fullbright is now latched again
|
|||
|
||||
chg: negative r_swapInterval values will request adaptive V-Sync when using an OpenGL back-end
|
||||
|
||||
fix: r_detailTextures 0 would mess up shaders where "detail" was used in a stage that isn't the last one
|
||||
|
||||
fix: dynamic lights could incorrectly stop applying to moving entities (e.g. cpm25 elevator)
|
||||
|
||||
fix: crash due to lack of memory for the sound system
|
||||
|
|
|
@ -2027,10 +2027,10 @@ static shader_t* FinishShader()
|
|||
// ditch this stage if it's detail and detail textures are disabled
|
||||
//
|
||||
if ( pStage->isDetail && !r_detailTextures->integer ) {
|
||||
if ( stage < ( MAX_SHADER_STAGES - 1 ) ) {
|
||||
memmove( pStage, pStage + 1, sizeof( *pStage ) * ( MAX_SHADER_STAGES - stage - 1 ) );
|
||||
Com_Memset( pStage + 1, 0, sizeof( *pStage ) );
|
||||
}
|
||||
const int toMove = MAX_SHADER_STAGES - stage - 1;
|
||||
memmove( pStage, pStage + 1, sizeof( *pStage ) * toMove );
|
||||
Com_Memset( &stages[MAX_SHADER_STAGES - 1], 0, sizeof( *pStage ) );
|
||||
stage--;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue