make hollow uses caulk, based on a pref setting

This commit is contained in:
Timothee Besset 2017-08-20 16:24:56 -05:00
parent 3a6c9d30ed
commit 732497b098
3 changed files with 12 additions and 9 deletions

View file

@ -67,7 +67,7 @@ void CSG_MakeHollowMode( int mode ){
} else {
VectorSubtract( split.planepts[i], move, split.planepts[i] );
}
Brush_SplitBrushByFace( b, &split, &front, &back );
Brush_SplitBrushByFace( b, &split, &front, &back, g_PrefsDlg.m_bMakeHollowCaulk );
if ( back ) {
Brush_Free( back );
}
@ -546,7 +546,7 @@ void CSG_Subtract( void ){
break;
}
if ( i != 3 ) {
continue; // definately don't touch
continue; // definitely don't touch
}
fragments = Brush_Subtract( s, b );
// if the brushes did not really intersect
@ -586,7 +586,7 @@ void CSG_Subtract( void ){
break;
}
if ( i != 3 ) {
continue; // definately don't touch
continue; // definitely don't touch
}
fragments = Brush_Subtract( s, b );
@ -623,12 +623,6 @@ void CSG_Subtract( void ){
Undo_EndBrush( frag );
}
/*if (numfragments == 0)
{
Sys_Printf("Selected brush%s did not intersect with any other brushes.\n",
(selected_brushes.next->next == &selected_brushes) ? "":"es");
return;
}*/
Sys_Printf( "done. (created %d fragment%s out of %d brush%s)\n", numfragments, ( numfragments == 1 ) ? "" : "s",
numbrushes, ( numbrushes == 1 ) ? "" : "es" );
Sys_UpdateWindows( W_ALL );

View file

@ -139,6 +139,7 @@
#define DEFAULTTEXURESCALE_KEY "DefaultTextureScale"
#define CAULKNEWBRUSHES_KEY "CaulkNewBrushes"
#define CLIPCAULK_KEY "ClipCaulk"
#define HOLLOWCAULK_KEY "HollowCaulk"
#define PATCHSHOWBOUNDS_KEY "PatchShowBounds"
#define NATIVEGUI_KEY "NativeGUI"
#define STARTONPRIMMON_KEY "StartOnPrimMon"
@ -2381,6 +2382,12 @@ void PrefsDlg::BuildDialog(){
gtk_widget_show( check );
AddDialogData( check, &m_bClipCaulk, DLG_CHECK_BOOL );
// Make Hollow uses caulk
check = gtk_check_button_new_with_label( _( "Make Hollow uses caulk" ) );
gtk_box_pack_start( GTK_BOX( vbox ), check, FALSE, FALSE, 0 );
gtk_widget_show( check );
AddDialogData( check, &m_bMakeHollowCaulk, DLG_CHECK_BOOL );
// Don't clamp plane points
check = gtk_check_button_new_with_label( _( "Don't clamp plane points" ) );
gtk_box_pack_start( GTK_BOX( vbox ), check, FALSE, FALSE, 0 );
@ -3083,6 +3090,7 @@ void PrefsDlg::LoadPrefs(){
mLocalPrefs.GetPref( CAULKNEWBRUSHES_KEY, &m_bCaulkNewBrushes, TRUE );
mLocalPrefs.GetPref( SUBDIVISIONS_KEY, &m_nSubdivisions, SUBDIVISIONS_DEF );
mLocalPrefs.GetPref( CLIPCAULK_KEY, &m_bClipCaulk, FALSE );
mLocalPrefs.GetPref( HOLLOWCAULK_KEY, &m_bMakeHollowCaulk, TRUE );
mLocalPrefs.GetPref( SNAPTTOGRID_KEY, &m_bSnapTToGrid, FALSE );
mLocalPrefs.GetPref( TARGETFIX_KEY, &m_bDoTargetFix, TRUE );
mLocalPrefs.GetPref( WHEELINC_KEY, &m_nWheelInc, 64 );

View file

@ -685,6 +685,7 @@ bool m_bRunQuake;
bool m_bDoSleep;
bool m_bClipCaulk;
bool m_bMakeHollowCaulk;
// make the texture increments match the grid changes
bool m_bSnapTToGrid;