From 6e687efe8899278a955efd1e3ba4de5300f7949a Mon Sep 17 00:00:00 2001 From: Garux Date: Tue, 1 Aug 2017 13:36:40 +0300 Subject: [PATCH] Q3map2: * content of brush is determined now not by 1st side in brush definition (inconsistency!) but on priority: liquid > fog > playerclip > nonsolid > solid ex.: nodraw solid shader works now for hiding liquid or fog volume splits / unwanted faces solid or nonsolid shader + face(s) of playerclip = playerclip solid shader + face(s) of nonsolid = nonsolid (b4 could happen: 5nonsolid sides + 1solid = solid brush ) Radiant: binds... * make structural - alt+s * shift+n - cycle patch tex projection * ctrl+f - fit texture * bind a, d in no mlook mode - CameraStrafeLeft/Right menus... * smartified content basically * hidden killconnect for games, which are not nexuiz * view-orthographic+: center 2d on selected (ctrl+shift+tab) * removed parent from menu, regroup does work + isn't bugged * edit+: SelectAllOfType (shift+a) * view->show+: ToggleCrosshair, show size info, show grid * view menu: +patch inspector * curve->texture+: flip patch tex ( {ctrl}shift+i ), naturalize, cycle projection * cleaned, updated help menu links,+: Mouse Shortcuts, recent offline&fixed Shader Manual, netRadiant specific docs, lists of q3map2 switches/entity keys/shader directives misc... * removed note to save before going to preferences, project settings * fog is automatically transparent * Doom3LightRadius: failed to parse default light radius - spammy msg removed * 1.5x bigger light ents (8->12u) * longer list of recently opened (4->9) * crosshair display: is saving in prefs * defaulted Maya theme * removed question to override current compile monitoring --- plugins/entity/light.cpp | 8 +++-- plugins/shaders/shaders.cpp | 1 + radiant/brushmanip.cpp | 2 +- radiant/camwindow.cpp | 4 +-- radiant/entity.cpp | 4 ++- radiant/gtkdlgs.cpp | 17 ++++------ radiant/mainframe.cpp | 51 ++++++++++++++++++----------- radiant/mru.cpp | 34 ++++++++++++++++++-- radiant/patchmanip.cpp | 53 +++++++++++++++++++------------ radiant/preferences.cpp | 3 +- radiant/surfacedialog.cpp | 2 +- radiant/watchbsp.cpp | 6 ++-- radiant/xywindow.cpp | 1 + radiant/xywindow.h | 8 ++--- setup/data/tools/global.xlink | 15 +++++++-- tools/quake3/q3map2/game_quake3.h | 4 +-- tools/quake3/q3map2/map.c | 30 ++++++++++++++++- 17 files changed, 171 insertions(+), 72 deletions(-) diff --git a/plugins/entity/light.cpp b/plugins/entity/light.cpp index dbde66c1..2d0bf78e 100644 --- a/plugins/entity/light.cpp +++ b/plugins/entity/light.cpp @@ -531,10 +531,12 @@ Callback m_changed; bool m_useCenterKey; Doom3LightRadius( const char* defaultRadius ) : m_defaultRadius( 300, 300, 300 ), m_center( 0, 0, 0 ), m_useCenterKey( false ){ - if ( !string_parse_vector3( defaultRadius, m_defaultRadius ) ) { + if ( g_lightType == LIGHTTYPE_DOOM3 ){ + if ( !string_parse_vector3( defaultRadius, m_defaultRadius ) ) { globalErrorStream() << "Doom3LightRadius: failed to parse default light radius\n"; - } + } m_radius = m_defaultRadius; + } } void lightRadiusChanged( const char* value ){ @@ -655,7 +657,7 @@ void render( RenderStateFlags state ) const { }; inline void default_extents( Vector3& extents ){ - extents = Vector3( 8, 8, 8 ); + extents = Vector3( 12, 12, 12 ); } class ShaderRef diff --git a/plugins/shaders/shaders.cpp b/plugins/shaders/shaders.cpp index 54df7abc..7a16594e 100644 --- a/plugins/shaders/shaders.cpp +++ b/plugins/shaders/shaders.cpp @@ -1255,6 +1255,7 @@ bool ShaderTemplate::parseQuake3( Tokeniser& tokeniser ){ if ( string_equal_nocase( surfaceparm, "fog" ) ) { m_nFlags |= QER_FOG; + m_nFlags |= QER_TRANS; if ( m_fTrans == 1.0f ) { // has not been explicitly set by qer_trans m_fTrans = 0.35f; } diff --git a/radiant/brushmanip.cpp b/radiant/brushmanip.cpp index 8e45973c..acb83822 100644 --- a/radiant/brushmanip.cpp +++ b/radiant/brushmanip.cpp @@ -1418,7 +1418,7 @@ void Brush_registerCommands(){ GlobalCommands_insert( "FlipClip", FreeCaller(), Accelerator( GDK_Return, (GdkModifierType)GDK_CONTROL_MASK ) ); GlobalCommands_insert( "MakeDetail", FreeCaller(), Accelerator( 'D', (GdkModifierType)GDK_MOD1_MASK ) ); - GlobalCommands_insert( "MakeStructural", FreeCaller(), Accelerator( 'S', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) ); + GlobalCommands_insert( "MakeStructural", FreeCaller(), Accelerator( 'S', (GdkModifierType)GDK_MOD1_MASK ) ); } void Brush_constructMenu( GtkMenu* menu ){ diff --git a/radiant/camwindow.cpp b/radiant/camwindow.cpp index 3d0c6a51..4d9ea736 100644 --- a/radiant/camwindow.cpp +++ b/radiant/camwindow.cpp @@ -1897,8 +1897,8 @@ void CamWnd_Construct(){ GlobalShortcuts_insert( "CameraBack", Accelerator( GDK_Down ) ); GlobalShortcuts_insert( "CameraLeft", Accelerator( GDK_Left ) ); GlobalShortcuts_insert( "CameraRight", Accelerator( GDK_Right ) ); - GlobalShortcuts_insert( "CameraStrafeRight", Accelerator( GDK_period ) ); - GlobalShortcuts_insert( "CameraStrafeLeft", Accelerator( GDK_comma ) ); + GlobalShortcuts_insert( "CameraStrafeRight", Accelerator( 'D' ) ); + GlobalShortcuts_insert( "CameraStrafeLeft", Accelerator( 'A' ) ); GlobalShortcuts_insert( "CameraUp", accelerator_null() ); GlobalShortcuts_insert( "CameraDown", accelerator_null() ); diff --git a/radiant/entity.cpp b/radiant/entity.cpp index ab3243b0..0704f50a 100644 --- a/radiant/entity.cpp +++ b/radiant/entity.cpp @@ -571,7 +571,9 @@ void Entity_constructMenu( GtkMenu* menu ){ create_menu_item_with_mnemonic( menu, "_Regroup", "GroupSelection" ); create_menu_item_with_mnemonic( menu, "_Ungroup", "UngroupSelection" ); create_menu_item_with_mnemonic( menu, "_Connect", "ConnectSelection" ); - create_menu_item_with_mnemonic( menu, "_KillConnect", "KillConnectSelection" ); + if ( g_pGameDescription->mGameType == "nexuiz" ) { + create_menu_item_with_mnemonic( menu, "_KillConnect", "KillConnectSelection" ); + } create_menu_item_with_mnemonic( menu, "_Select Color...", "EntityColor" ); create_menu_item_with_mnemonic( menu, "_Normalize Color...", "NormalizeColor" ); } diff --git a/radiant/gtkdlgs.cpp b/radiant/gtkdlgs.cpp index 34fc54c7..7bdea67d 100644 --- a/radiant/gtkdlgs.cpp +++ b/radiant/gtkdlgs.cpp @@ -362,7 +362,7 @@ void ProjectSettingsDialog_ok( ProjectSettingsDialog& dialog ){ } void DoProjectSettings(){ - if ( ConfirmModified( "Edit Project Settings" ) ) { + //if ( ConfirmModified( "Edit Project Settings" ) ) { ModalDialog modal; ProjectSettingsDialog dialog; @@ -373,7 +373,7 @@ void DoProjectSettings(){ } gtk_widget_destroy( GTK_WIDGET( window ) ); - } + //} } // ============================================================================= @@ -478,10 +478,7 @@ void DoAbout(){ RADIANT_ABOUTMSG "\n\n" "By alientrap.org\n\n" "This program is free software\n" - "licensed under the GNU GPL.\n\n" - "NetRadiant is unsupported, however\n" - "you may report your problems at\n" - "http://www.icculus.org/netradiant/" + "licensed under the GNU GPL.\n" ) ); gtk_widget_show( GTK_WIDGET( label ) ); @@ -677,13 +674,13 @@ EMessageBoxReturn DoTextureLayout( float *fx, float *fy ){ } } } - + // Initialize with last used values char buf[16]; - + sprintf( buf, "%f", last_used_texture_layout_scale_x ); gtk_entry_set_text( x, buf ); - + sprintf( buf, "%f", last_used_texture_layout_scale_y ); gtk_entry_set_text( y, buf ); @@ -694,7 +691,7 @@ EMessageBoxReturn DoTextureLayout( float *fx, float *fy ){ if ( ret == eIDOK ) { *fx = static_cast( atof( gtk_entry_get_text( x ) ) ); *fy = static_cast( atof( gtk_entry_get_text( y ) ) ); - + // Remember last used values last_used_texture_layout_scale_x = *fx; last_used_texture_layout_scale_y = *fy; diff --git a/radiant/mainframe.cpp b/radiant/mainframe.cpp index 26e337a4..53878054 100644 --- a/radiant/mainframe.cpp +++ b/radiant/mainframe.cpp @@ -1822,16 +1822,16 @@ GtkMenuItem* create_file_menu(){ create_menu_item_with_mnemonic( menu, "Save s_elected...", "SaveSelected" ); menu_separator( menu ); create_menu_item_with_mnemonic( menu, "Save re_gion...", "SaveRegion" ); - menu_separator( menu ); - create_menu_item_with_mnemonic( menu, "_Refresh models", "RefreshReferences" ); - menu_separator( menu ); +// menu_separator( menu ); +// create_menu_item_with_mnemonic( menu, "_Refresh models", "RefreshReferences" ); +// menu_separator( menu ); create_menu_item_with_mnemonic( menu, "Pro_ject settings...", "ProjectSettings" ); menu_separator( menu ); create_menu_item_with_mnemonic( menu, "_Pointfile...", "TogglePointfile" ); menu_separator( menu ); MRU_constructMenu( menu ); menu_separator( menu ); - create_menu_item_with_mnemonic( menu, "Check for NetRadiant update (web)", "CheckForUpdate" ); // FIXME +// create_menu_item_with_mnemonic( menu, "Check for NetRadiant update (web)", "CheckForUpdate" ); // FIXME create_menu_item_with_mnemonic( menu, "E_xit", "Exit" ); return file_menu_item; @@ -1855,18 +1855,22 @@ GtkMenuItem* create_edit_menu(){ create_menu_item_with_mnemonic( menu, "Duplicate, make uni_que", "CloneSelectionAndMakeUnique" ); create_menu_item_with_mnemonic( menu, "D_elete", "DeleteSelection" ); menu_separator( menu ); - create_menu_item_with_mnemonic( menu, "Pa_rent", "ParentSelection" ); + create_menu_item_with_mnemonic( menu, "Snap To Grid", "SnapToGrid" ); + //create_menu_item_with_mnemonic( menu, "Pa_rent", "ParentSelection" ); menu_separator( menu ); create_menu_item_with_mnemonic( menu, "C_lear Selection", "UnSelectSelection" ); create_menu_item_with_mnemonic( menu, "_Invert Selection", "InvertSelection" ); create_menu_item_with_mnemonic( menu, "Select i_nside", "SelectInside" ); create_menu_item_with_mnemonic( menu, "Select _touching", "SelectTouching" ); - GtkMenu* convert_menu = create_sub_menu_with_mnemonic( menu, "E_xpand Selection" ); - if ( g_Layout_enableDetachableMenus.m_value ) { - menu_tearoff( convert_menu ); - } - create_menu_item_with_mnemonic( convert_menu, "To Whole _Entities", "ExpandSelectionToEntities" ); + menu_separator( menu ); + +// GtkMenu* convert_menu = create_sub_menu_with_mnemonic( menu, "E_xpand Selection" ); +// if ( g_Layout_enableDetachableMenus.m_value ) { +// menu_tearoff( convert_menu ); +// } + create_menu_item_with_mnemonic( menu, "Select All Of Type", "SelectAllOfType" ); + create_menu_item_with_mnemonic( menu, "_Expand Selection To Entities", "ExpandSelectionToEntities" ); menu_separator( menu ); create_menu_item_with_mnemonic( menu, "Pre_ferences...", "Preferences" ); @@ -1918,6 +1922,7 @@ GtkMenuItem* create_view_menu( MainFrame::EViewStyle style ){ create_menu_item_with_mnemonic( menu, "Entity Inspector", "ViewEntityInfo" ); } create_menu_item_with_mnemonic( menu, "_Surface Inspector", "SurfaceInspector" ); + create_menu_item_with_mnemonic( menu, "_Patch Inspector", "PatchInspector" ); create_menu_item_with_mnemonic( menu, "Entity List", "EntityList" ); menu_separator( menu ); @@ -1953,6 +1958,8 @@ GtkMenuItem* create_view_menu( MainFrame::EViewStyle style ){ menu_separator( orthographic_menu ); } + create_menu_item_with_mnemonic( orthographic_menu, "Center on Selected", "CenterXYView" ); + menu_separator( orthographic_menu ); create_menu_item_with_mnemonic( orthographic_menu, "_XY 100%", "Zoom100" ); create_menu_item_with_mnemonic( orthographic_menu, "XY Zoom _In", "ZoomIn" ); create_menu_item_with_mnemonic( orthographic_menu, "XY Zoom _Out", "ZoomOut" ); @@ -1965,6 +1972,12 @@ GtkMenuItem* create_view_menu( MainFrame::EViewStyle style ){ if ( g_Layout_enableDetachableMenus.m_value ) { menu_tearoff( menu_in_menu ); } + create_menu_item_with_mnemonic( menu_in_menu, "Show Size Info", "ToggleSizePaint" ); + create_menu_item_with_mnemonic( menu_in_menu, "Show Crosshair", "ToggleCrosshairs" ); + create_menu_item_with_mnemonic( menu_in_menu, "Show Grid", "ToggleGrid" ); + + menu_separator( menu_in_menu ); + create_check_menu_item_with_mnemonic( menu_in_menu, "Show _Angles", "ShowAngles" ); create_check_menu_item_with_mnemonic( menu_in_menu, "Show _Names", "ShowNames" ); create_check_menu_item_with_mnemonic( menu_in_menu, "Show Blocks", "ShowBlocks" ); @@ -1984,12 +1997,14 @@ GtkMenuItem* create_view_menu( MainFrame::EViewStyle style ){ } menu_separator( menu ); { - GtkMenu* menu_in_menu = create_sub_menu_with_mnemonic( menu, "Hide/Show" ); - if ( g_Layout_enableDetachableMenus.m_value ) { - menu_tearoff( menu_in_menu ); - } - create_menu_item_with_mnemonic( menu_in_menu, "Hide Selected", "HideSelected" ); - create_menu_item_with_mnemonic( menu_in_menu, "Show Hidden", "ShowHidden" ); +// GtkMenu* menu_in_menu = create_sub_menu_with_mnemonic( menu, "Hide/Show" ); +// if ( g_Layout_enableDetachableMenus.m_value ) { +// menu_tearoff( menu_in_menu ); +// } +// create_menu_item_with_mnemonic( menu_in_menu, "Hide Selected", "HideSelected" ); +// create_menu_item_with_mnemonic( menu_in_menu, "Show Hidden", "ShowHidden" ); + create_menu_item_with_mnemonic( menu, "Hide Selected", "HideSelected" ); + create_menu_item_with_mnemonic( menu, "Show Hidden", "ShowHidden" ); } menu_separator( menu ); { @@ -2164,13 +2179,13 @@ GtkMenuItem* create_help_menu(){ menu_tearoff( menu ); } - create_menu_item_with_mnemonic( menu, "Manual", "OpenManual" ); +// create_menu_item_with_mnemonic( menu, "Manual", "OpenManual" ); // this creates all the per-game drop downs for the game pack helps // it will take care of hooking the Sys_OpenURL calls etc. create_game_help_menu( menu ); - create_menu_item_with_mnemonic( menu, "Bug report", FreeCaller() ); +// create_menu_item_with_mnemonic( menu, "Bug report", FreeCaller() ); create_menu_item_with_mnemonic( menu, "Shortcuts list", FreeCaller() ); create_menu_item_with_mnemonic( menu, "_About", FreeCaller() ); diff --git a/radiant/mru.cpp b/radiant/mru.cpp index cb833010..24efcf04 100644 --- a/radiant/mru.cpp +++ b/radiant/mru.cpp @@ -34,14 +34,14 @@ #include "map.h" #include "qe3.h" -#define MRU_MAX 4 +#define MRU_MAX 9 namespace { GtkMenuItem *MRU_items[MRU_MAX]; std::size_t MRU_used; typedef CopiedString MRU_filename_t; MRU_filename_t MRU_filenames[MRU_MAX]; typedef const char* MRU_key_t; -MRU_key_t MRU_keys[MRU_MAX] = { "File0", "File1", "File2", "File3" }; +MRU_key_t MRU_keys[MRU_MAX] = { "File0", "File1", "File2", "File3", "File4", "File5", "File6", "File7", "File8" }; } inline const char* MRU_GetText( std::size_t index ){ @@ -190,6 +190,11 @@ LoadMRU g_load_mru1( 1 ); LoadMRU g_load_mru2( 2 ); LoadMRU g_load_mru3( 3 ); LoadMRU g_load_mru4( 4 ); +LoadMRU g_load_mru5( 5 ); +LoadMRU g_load_mru6( 6 ); +LoadMRU g_load_mru7( 7 ); +LoadMRU g_load_mru8( 8 ); +LoadMRU g_load_mru9( 9 ); void MRU_constructMenu( GtkMenu* menu ){ { @@ -212,6 +217,31 @@ void MRU_constructMenu( GtkMenu* menu ){ gtk_widget_hide( GTK_WIDGET( item ) ); MRU_AddWidget( item, 3 ); } + { + GtkMenuItem* item = create_menu_item_with_mnemonic( menu, "_5", LoadMRUCaller( g_load_mru5 ) ); + gtk_widget_hide( GTK_WIDGET( item ) ); + MRU_AddWidget( item, 4 ); + } + { + GtkMenuItem* item = create_menu_item_with_mnemonic( menu, "_6", LoadMRUCaller( g_load_mru6 ) ); + gtk_widget_hide( GTK_WIDGET( item ) ); + MRU_AddWidget( item, 5 ); + } + { + GtkMenuItem* item = create_menu_item_with_mnemonic( menu, "_7", LoadMRUCaller( g_load_mru7 ) ); + gtk_widget_hide( GTK_WIDGET( item ) ); + MRU_AddWidget( item, 6 ); + } + { + GtkMenuItem* item = create_menu_item_with_mnemonic( menu, "_8", LoadMRUCaller( g_load_mru8 ) ); + gtk_widget_hide( GTK_WIDGET( item ) ); + MRU_AddWidget( item, 7 ); + } + { + GtkMenuItem* item = create_menu_item_with_mnemonic( menu, "_9", LoadMRUCaller( g_load_mru9 ) ); + gtk_widget_hide( GTK_WIDGET( item ) ); + MRU_AddWidget( item, 8 ); + } } #include "preferencesystem.h" diff --git a/radiant/patchmanip.cpp b/radiant/patchmanip.cpp index d5471e98..fbb89e05 100644 --- a/radiant/patchmanip.cpp +++ b/radiant/patchmanip.cpp @@ -695,7 +695,7 @@ void Patch_registerCommands(){ GlobalCommands_insert( "SmoothCols", FreeCaller(), Accelerator( 'W', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) ); GlobalCommands_insert( "MatrixTranspose", FreeCaller(), Accelerator( 'M', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) ); GlobalCommands_insert( "CapCurrentCurve", FreeCaller(), Accelerator( 'C', (GdkModifierType)GDK_SHIFT_MASK ) ); - GlobalCommands_insert( "CycleCapTexturePatch", FreeCaller(), Accelerator( 'N', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) ); + GlobalCommands_insert( "CycleCapTexturePatch", FreeCaller(), Accelerator( 'N', (GdkModifierType)GDK_SHIFT_MASK ) ); GlobalCommands_insert( "MakeOverlayPatch", FreeCaller(), Accelerator( 'Y' ) ); GlobalCommands_insert( "ClearPatchOverlays", FreeCaller(), Accelerator( 'L', (GdkModifierType)GDK_CONTROL_MASK ) ); } @@ -720,12 +720,12 @@ void Patch_constructMenu( GtkMenu* menu ){ create_menu_item_with_mnemonic( menu, "End cap", "PatchEndCap" ); create_menu_item_with_mnemonic( menu, "Bevel", "PatchBevel" ); { - GtkMenu* menu_in_menu = create_sub_menu_with_mnemonic( menu, "More End caps, Bevels" ); - if ( g_Layout_enableDetachableMenus.m_value ) { - menu_tearoff( menu_in_menu ); - } - create_menu_item_with_mnemonic( menu_in_menu, "Square Endcap", "PatchSquareBevel" ); - create_menu_item_with_mnemonic( menu_in_menu, "Square Bevel", "PatchSquareEndcap" ); +// GtkMenu* menu_in_menu = create_sub_menu_with_mnemonic( menu, "More End caps, Bevels" ); +// if ( g_Layout_enableDetachableMenus.m_value ) { +// menu_tearoff( menu_in_menu ); +// } + create_menu_item_with_mnemonic( menu, "Square Endcap", "PatchSquareBevel" ); + create_menu_item_with_mnemonic( menu, "Square Bevel", "PatchSquareEndcap" ); } menu_separator( menu ); create_menu_item_with_mnemonic( menu, "Cone", "PatchCone" ); @@ -765,23 +765,36 @@ void Patch_constructMenu( GtkMenu* menu ){ menu_tearoff( menu_in_menu ); } create_menu_item_with_mnemonic( menu_in_menu, "Invert", "InvertCurve" ); - GtkMenu* menu_3 = create_sub_menu_with_mnemonic( menu_in_menu, "Re-disperse" ); - if ( g_Layout_enableDetachableMenus.m_value ) { - menu_tearoff( menu_3 ); - } - create_menu_item_with_mnemonic( menu_3, "Rows", "RedisperseRows" ); - create_menu_item_with_mnemonic( menu_3, "Columns", "RedisperseCols" ); - GtkMenu* menu_4 = create_sub_menu_with_mnemonic( menu_in_menu, "Smooth" ); - if ( g_Layout_enableDetachableMenus.m_value ) { - menu_tearoff( menu_4 ); - } - create_menu_item_with_mnemonic( menu_4, "Rows", "SmoothRows" ); - create_menu_item_with_mnemonic( menu_4, "Columns", "SmoothCols" ); create_menu_item_with_mnemonic( menu_in_menu, "Transpose", "MatrixTranspose" ); +// GtkMenu* menu_3 = create_sub_menu_with_mnemonic( menu_in_menu, "Re-disperse" ); +// if ( g_Layout_enableDetachableMenus.m_value ) { +// menu_tearoff( menu_3 ); +// } + menu_separator( menu_in_menu ); + create_menu_item_with_mnemonic( menu_in_menu, "Re-disperse Rows", "RedisperseRows" ); + create_menu_item_with_mnemonic( menu_in_menu, "Re-disperse Columns", "RedisperseCols" ); +// GtkMenu* menu_4 = create_sub_menu_with_mnemonic( menu_in_menu, "Smooth" ); +// if ( g_Layout_enableDetachableMenus.m_value ) { +// menu_tearoff( menu_4 ); +// } + menu_separator( menu_in_menu ); + create_menu_item_with_mnemonic( menu_in_menu, "Smooth Rows", "SmoothRows" ); + create_menu_item_with_mnemonic( menu_in_menu, "Smooth Columns", "SmoothCols" ); } menu_separator( menu ); create_menu_item_with_mnemonic( menu, "Cap Selection", "CapCurrentCurve" ); - create_menu_item_with_mnemonic( menu, "Cycle Cap Texture", "CycleCapTexturePatch" ); + menu_separator( menu ); + { + GtkMenu* menu_in_menu = create_sub_menu_with_mnemonic( menu, "Texture" ); + if ( g_Layout_enableDetachableMenus.m_value ) { + menu_tearoff( menu_in_menu ); + } + create_menu_item_with_mnemonic( menu_in_menu, "Cycle Projection", "CycleCapTexturePatch" ); + create_menu_item_with_mnemonic( menu_in_menu, "Naturalize", "NaturalizePatch" ); + create_menu_item_with_mnemonic( menu_in_menu, "Invert X", "InvertCurveTextureX" ); + create_menu_item_with_mnemonic( menu_in_menu, "Invert Y", "InvertCurveTextureY" ); + + } menu_separator( menu ); { GtkMenu* menu_in_menu = create_sub_menu_with_mnemonic( menu, "Overlay" ); diff --git a/radiant/preferences.cpp b/radiant/preferences.cpp index 4209fdb3..c4584e81 100644 --- a/radiant/preferences.cpp +++ b/radiant/preferences.cpp @@ -932,7 +932,8 @@ void PreferencesDialog_restartRequired( const char* staticName ){ } void PreferencesDialog_showDialog(){ - if ( ConfirmModified( "Edit Preferences" ) && g_Preferences.DoModal() == eIDOK ) { + //if ( ConfirmModified( "Edit Preferences" ) && g_Preferences.DoModal() == eIDOK ) { + if ( g_Preferences.DoModal() == eIDOK ) { if ( !g_restart_required.empty() ) { StringOutputStream message( 256 ); message << "Preference changes require a restart:\n"; diff --git a/radiant/surfacedialog.cpp b/radiant/surfacedialog.cpp index 3d64f411..e48f9b02 100644 --- a/radiant/surfacedialog.cpp +++ b/radiant/surfacedialog.cpp @@ -1505,7 +1505,7 @@ void SurfaceInspector_registerPreferencesPage(){ } void SurfaceInspector_registerCommands(){ - GlobalCommands_insert( "FitTexture", FreeCaller(), Accelerator( 'B', (GdkModifierType)GDK_SHIFT_MASK ) ); + GlobalCommands_insert( "FitTexture", FreeCaller(), Accelerator( 'F', (GdkModifierType)GDK_CONTROL_MASK ) ); GlobalCommands_insert( "SurfaceInspector", FreeCaller(), Accelerator( 'S' ) ); GlobalCommands_insert( "FaceCopyTexture", FreeCaller() ); diff --git a/radiant/watchbsp.cpp b/radiant/watchbsp.cpp index f3d1ae6f..a598ff51 100644 --- a/radiant/watchbsp.cpp +++ b/radiant/watchbsp.cpp @@ -772,11 +772,11 @@ void CWatchBSP::DoMonitoringLoop( GPtrArray *pCmd, const char *sBSPName ){ if ( m_eState != EIdle ) { globalOutputStream() << "WatchBSP got a monitoring request while not idling...\n"; // prompt the user, should we cancel the current process and go ahead? - if ( gtk_MessageBox( GTK_WIDGET( MainFrame_getWindow() ), "I am already monitoring a Build process.\nDo you want me to override and start a new compilation?", - "Build process monitoring", eMB_YESNO ) == eIDYES ) { +// if ( gtk_MessageBox( GTK_WIDGET( MainFrame_getWindow() ), "I am already monitoring a Build process.\nDo you want me to override and start a new compilation?", +// "Build process monitoring", eMB_YESNO ) == eIDYES ) { // disconnect and set EIdle state Reset(); - } +// } } m_pCmd = str_ptr_array_clone( pCmd ); m_iCurrentStep = 0; diff --git a/radiant/xywindow.cpp b/radiant/xywindow.cpp index b094b774..471a5572 100644 --- a/radiant/xywindow.cpp +++ b/radiant/xywindow.cpp @@ -2758,6 +2758,7 @@ void XYWindow_Construct(){ GlobalPreferenceSystem().registerPreference( "NewRightClick", BoolImportStringCaller( g_xywindow_globals.m_bRightClick ), BoolExportStringCaller( g_xywindow_globals.m_bRightClick ) ); GlobalPreferenceSystem().registerPreference( "ChaseMouse", BoolImportStringCaller( g_xywindow_globals_private.m_bChaseMouse ), BoolExportStringCaller( g_xywindow_globals_private.m_bChaseMouse ) ); GlobalPreferenceSystem().registerPreference( "SizePainting", BoolImportStringCaller( g_xywindow_globals_private.m_bSizePaint ), BoolExportStringCaller( g_xywindow_globals_private.m_bSizePaint ) ); + GlobalPreferenceSystem().registerPreference( "ShowCrosshair", BoolImportStringCaller( g_bCrossHairs ), BoolExportStringCaller( g_bCrossHairs ) ); GlobalPreferenceSystem().registerPreference( "NoStipple", BoolImportStringCaller( g_xywindow_globals.m_bNoStipple ), BoolExportStringCaller( g_xywindow_globals.m_bNoStipple ) ); GlobalPreferenceSystem().registerPreference( "SI_ShowCoords", BoolImportStringCaller( g_xywindow_globals_private.show_coordinates ), BoolExportStringCaller( g_xywindow_globals_private.show_coordinates ) ); GlobalPreferenceSystem().registerPreference( "SI_ShowOutlines", BoolImportStringCaller( g_xywindow_globals_private.show_outline ), BoolExportStringCaller( g_xywindow_globals_private.show_outline ) ); diff --git a/radiant/xywindow.h b/radiant/xywindow.h index cbf37b43..114f3394 100644 --- a/radiant/xywindow.h +++ b/radiant/xywindow.h @@ -255,10 +255,10 @@ struct xywindow_globals_t bool m_bNoStipple; xywindow_globals_t() : - color_gridback( 1.f, 1.f, 1.f ), - color_gridminor( 0.75f, 0.75f, 0.75f ), - color_gridmajor( 0.5f, 0.5f, 0.5f ), - color_gridblock( 0.f, 0.f, 1.f ), + color_gridback( 0.77f, 0.77f, 0.77f ), + color_gridminor( 0.83f, 0.83f, 0.83f ), + color_gridmajor( 0.89f, 0.89f, 0.89f ), + color_gridblock( 1.0f, 1.0f, 1.0f ), color_gridtext( 0.f, 0.f, 0.f ), color_brushes( 0.f, 0.f, 0.f ), color_selbrushes( 1.f, 0.f, 0.f ), diff --git a/setup/data/tools/global.xlink b/setup/data/tools/global.xlink index 3ca47f1a..86b2945f 100644 --- a/setup/data/tools/global.xlink +++ b/setup/data/tools/global.xlink @@ -1,7 +1,16 @@ - - - + + + + + + + + + + + + diff --git a/tools/quake3/q3map2/game_quake3.h b/tools/quake3/q3map2/game_quake3.h index d4069556..3526a781 100644 --- a/tools/quake3/q3map2/game_quake3.h +++ b/tools/quake3/q3map2/game_quake3.h @@ -68,7 +68,7 @@ #define Q_CONT_NODROP 0x80000000 /* don't leave bodies or items (death fog, lava) */ #define Q_SURF_NODAMAGE 0x1 /* never give falling damage */ -#define Q_SURF_SLICK 0x2 /* effects game physics */ +#define Q_SURF_SLICK 0x2 /* effects game physics: zero friction on this */ #define Q_SURF_SKY 0x4 /* lighting from environment map */ #define Q_SURF_LADDER 0x8 #define Q_SURF_NOIMPACT 0x10 /* don't make missile explosions */ @@ -199,7 +199,7 @@ { "nodlight", 0, 0, Q_SURF_NODLIGHT, 0, 0, 0 }, { "dust", 0, 0, Q_SURF_DUST, 0, 0, 0 }, { "noob", 0, 0, Q_SURF_NOOB, 0, 0, 0 }, - { "ob", 0, 0, 0, 0, C_OB, 0 }, + { "ob", 0, 0, 0, 0, C_OB, 0 }, /* null */ diff --git a/tools/quake3/q3map2/map.c b/tools/quake3/q3map2/map.c index 8f56f9af..9c219d5c 100644 --- a/tools/quake3/q3map2/map.c +++ b/tools/quake3/q3map2/map.c @@ -528,7 +528,8 @@ void SetBrushContents( brush_t *b ){ //% mixed = qfalse; /* get the content/compile flags for every side in the brush */ - for ( i = 1; i < b->numsides; i++, s++ ) + //for ( i = 1; i < b->numsides; i++, s++ ) + for ( i = 1; i < b->numsides; i++ ) { s = &b->sides[ i ]; if ( s->shaderInfo == NULL ) { @@ -539,6 +540,33 @@ void SetBrushContents( brush_t *b ){ contentFlags |= s->contentFlags; compileFlags |= s->compileFlags; + + /* resolve inconsistency, when brush content was determined by 1st face */ + if ( b->contentShader->compileFlags & C_LIQUID ){ + continue; + } + else if ( s->compileFlags & C_LIQUID ){ + b->contentShader = s->shaderInfo; + } + else if ( b->contentShader->compileFlags & C_FOG ){ + continue; + } + else if ( s->compileFlags & C_FOG ){ + b->contentShader = s->shaderInfo; + } + //playerclip + else if ( b->contentShader->contentFlags & 0x10000 ){ + continue; + } + else if ( s->contentFlags & 0x10000 ){ + b->contentShader = s->shaderInfo; + } + else if (!( b->contentShader->compileFlags & C_SOLID )){ + continue; + } + else if (!( s->compileFlags & C_SOLID )){ + b->contentShader = s->shaderInfo; + } } /* ydnar: getting rid of this stupid warning */ -- 2.39.2