/* try to find an existing shader */
for ( i = 0; i < numBSPShaders; i++ )
{
- /* ydnar: handle custom surface/content flags */
+ /* ydnar: handle custom surface/content flags */
if ( surfaceFlags != NULL && bspShaders[ i ].surfaceFlags != *surfaceFlags ) {
continue;
}
if ( contentFlags != NULL && bspShaders[ i ].contentFlags != *contentFlags ) {
continue;
}
-
+ if ( !doingBSP ){
+ si = ShaderInfoForShader( shader );
+ if ( si->remapShader && si->remapShader[ 0 ] ) {
+ shader = si->remapShader;
+ }
+ }
/* compare name */
if ( !Q_stricmp( shader, bspShaders[ i ].shader ) ) {
return i;