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
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;
}
/* 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 );
/* 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 );
}
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" ) ) {
Sys_Printf( "Enabling randomized dirtmapping\n" );
}
else{
- Sys_Printf( "Enabling ordered dir mapping\n" );
+ Sys_Printf( "Enabling ordered dirtmapping\n" );
}
i++;
}
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 );
/* 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 );
/* 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;