Q3map2:
fix * q3map_remapshader remaps anything fine, on all stages (effect is: postrenaming shader when things are have been done) * typo at -dirtmode Radiant: misc... * translucent textures are visible, while selected, too; +matching trans polys are visible simultaneously
This commit is contained in:
parent
9fed37bae0
commit
7ca7a54fe6
|
|
@ -2363,6 +2363,7 @@ void OpenGLShader::construct( const char* name ){
|
|||
BlendFunc blendFunc = m_shader->getBlendFunc();
|
||||
state.m_blend_src = convertBlendFactor( blendFunc.m_src );
|
||||
state.m_blend_dst = convertBlendFactor( blendFunc.m_dst );
|
||||
state.m_depthfunc = GL_LEQUAL;
|
||||
if ( state.m_blend_src == GL_SRC_ALPHA || state.m_blend_dst == GL_SRC_ALPHA ) {
|
||||
state.m_state |= RENDER_DEPTHWRITE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -707,6 +707,7 @@ int BSPMain( int argc, char **argv ){
|
|||
/* note it */
|
||||
Sys_Printf( "--- BSP ---\n" );
|
||||
|
||||
doingBSP = qtrue;
|
||||
SetDrawSurfacesBuffer();
|
||||
mapDrawSurfs = safe_malloc( sizeof( mapDrawSurface_t ) * MAX_MAP_DRAW_SURFS );
|
||||
memset( mapDrawSurfs, 0, sizeof( mapDrawSurface_t ) * MAX_MAP_DRAW_SURFS );
|
||||
|
|
|
|||
|
|
@ -177,11 +177,12 @@ void SwapBSPFile( void ){
|
|||
/* shaders (don't swap the name) */
|
||||
for ( i = 0; i < numBSPShaders ; i++ )
|
||||
{
|
||||
if ( doingBSP ){
|
||||
si = ShaderInfoForShader( bspShaders[ i ].shader );
|
||||
if ( si->remapShader && si->remapShader[ 0 ] ) {
|
||||
strcpy( bspShaders[ i ].shader, si->remapShader );
|
||||
}
|
||||
|
||||
}
|
||||
bspShaders[ i ].contentFlags = LittleLong( bspShaders[ i ].contentFlags );
|
||||
bspShaders[ i ].surfaceFlags = LittleLong( bspShaders[ i ].surfaceFlags );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2791,12 +2791,11 @@ int LightMain( int argc, char **argv ){
|
|||
lightAngleHL = ( atoi( argv[ i + 1 ] ) != 0 );
|
||||
if ( lightAngleHL ) {
|
||||
Sys_Printf( "Enabling half lambert light angle attenuation\n" );
|
||||
i++;
|
||||
}
|
||||
else{
|
||||
Sys_Printf( "Disabling half lambert light angle attenuation\n" );
|
||||
i++;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-nostyle" ) || !strcmp( argv[ i ], "-nostyles" ) ) {
|
||||
|
|
@ -2842,7 +2841,7 @@ int LightMain( int argc, char **argv ){
|
|||
Sys_Printf( "Enabling randomized dirtmapping\n" );
|
||||
}
|
||||
else{
|
||||
Sys_Printf( "Enabling ordered dir mapping\n" );
|
||||
Sys_Printf( "Enabling ordered dirtmapping\n" );
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1291,13 +1291,13 @@ int ScaleBSPMain( int argc, char **argv ){
|
|||
GetVectorForKey( &entities[ i ], "origin", vec );
|
||||
if ( ( vec[ 0 ] || vec[ 1 ] || vec[ 2 ] ) ) {
|
||||
if ( !strncmp( ValueForKey( &entities[i], "classname" ), "info_player_", 12 ) ) {
|
||||
// vec[2] += spawn_ref;
|
||||
vec[2] += spawn_ref;
|
||||
}
|
||||
vec[0] *= scale[0];
|
||||
vec[1] *= scale[1];
|
||||
vec[2] *= scale[2];
|
||||
if ( !strncmp( ValueForKey( &entities[i], "classname" ), "info_player_", 12 ) ) {
|
||||
vec[2] += spawn_ref;
|
||||
vec[2] -= spawn_ref;
|
||||
}
|
||||
sprintf( str, "%f %f %f", vec[ 0 ], vec[ 1 ], vec[ 2 ] );
|
||||
SetKeyValue( &entities[ i ], "origin", str );
|
||||
|
|
|
|||
|
|
@ -1999,6 +1999,9 @@ Q_EXTERN qboolean warnImage Q_ASSIGN( qtrue );
|
|||
/* ydnar: sinusoid samples */
|
||||
Q_EXTERN float jitters[ MAX_JITTERS ];
|
||||
|
||||
/*can't code*/
|
||||
Q_EXTERN qboolean doingBSP Q_ASSIGN( qfalse );
|
||||
|
||||
|
||||
/* commandline arguments */
|
||||
Q_EXTERN qboolean nocmdline Q_ASSIGN( qfalse );
|
||||
|
|
|
|||
|
|
@ -63,7 +63,12 @@ int EmitShader( const char *shader, int *contentFlags, int *surfaceFlags ){
|
|||
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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user