]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
Q3map2:
authorGarux <garux@mail.ru>
Wed, 2 Aug 2017 06:06:17 +0000 (09:06 +0300)
committerGarux <garux@mail.ru>
Wed, 2 Aug 2017 06:06:17 +0000 (09:06 +0300)
* code fixes
* packer: !FAIL! msg for missing ingame resources, ~fail for the rest
* bumped stack size to 4Mb to fix crash for huge skies, using old shaders with fairly useless q3map_surfacelight + q3map_lightsubdivide < 999 combo

Radiant:

binds...
* F5: run first in the list or recently invoked build option
* F11: fullscreen

misc...
* opening *.map, sent via cmd line: enabled for non win32 too
* fix: textures find/replace wnd better default pos, size
* fix: crash in CSG::Subtract
* fix crash: main wnd maximized + 'start on primary monitor' off + monitors > 1
* correct save/restore of main wnd pos/size and maximized/fullscreened states
* scale widgets consistently along with main wnd, while using regular layout

18 files changed:
Makefile
libs/string/string.h
radiant/build.cpp
radiant/build.h
radiant/csg.cpp
radiant/environment.cpp
radiant/environment.h
radiant/findtexturedialog.cpp
radiant/main.cpp
radiant/mainframe.cpp
radiant/map.cpp
radiant/server.cpp
tools/quake3/q3map2/brush.c
tools/quake3/q3map2/bspfile_abstract.c
tools/quake3/q3map2/main.c
tools/quake3/q3map2/q3map2.h
tools/quake3/q3map2/shaders.c
tools/quake3/q3map2/surface.c

index 048407fb021f99aea7c880f3e0813ef1a3747b04..bcb1f6f601ff720c7658ecb26cf0d0c37e739f03 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -483,7 +483,9 @@ endif
 %.o: %.c $(if $(findstring $(DEPEND_ON_MAKEFILE),yes),$(wildcard Makefile*),) | dependencies-check
        $(CC) $< $(CFLAGS) $(CFLAGS_COMMON) $(CPPFLAGS_EXTRA) $(CPPFLAGS_COMMON) $(CPPFLAGS) $(TARGET_ARCH) -c -o $@
 
-$(INSTALLDIR)/q3map2.$(EXE): LDFLAGS_EXTRA := -Wl,--large-address-aware
+ifeq ($(OS),Win32)
+$(INSTALLDIR)/q3map2.$(EXE): LDFLAGS_EXTRA := -Wl,--large-address-aware,--stack,4194304
+endif
 $(INSTALLDIR)/q3map2.$(EXE): LIBS_EXTRA := $(LIBS_XML) $(LIBS_GLIB) $(LIBS_PNG) $(LIBS_JPEG) $(LIBS_ZLIB)
 $(INSTALLDIR)/q3map2.$(EXE): CPPFLAGS_EXTRA := $(CPPFLAGS_XML) $(CPPFLAGS_GLIB) $(CPPFLAGS_PNG) $(CPPFLAGS_JPEG) -Itools/quake3/common -Ilibs -Iinclude
 $(INSTALLDIR)/q3map2.$(EXE): \
index 826d4a938392209ba847facc52f353ae5341d16d..dd67d2aff25513a6192114d292c8f3c6bc842854 100644 (file)
@@ -148,6 +148,11 @@ inline bool string_equal_suffix( const char* string, const char* suffix){
        return string_equal_n( s , suffix, string_length( suffix ) );
 }
 
+inline bool string_equal_suffix_nocase( const char* string, const char* suffix){
+       const char *s = string + string_length( string ) - string_length( suffix );
+       return string_equal_nocase_n( s , suffix, string_length( suffix ) );
+}
+
 /// \brief Copies \p other into \p string and returns \p string.
 /// Assumes that the space allocated for \p string is at least string_length(other) + 1.
 /// O(n)
index 793ab5a55ddce6ab9ef57acee19358065a7e9454..baa39568a68851be40f521accb150fd0d0d9a91b 100644 (file)
@@ -954,6 +954,7 @@ GtkWindow* BuildMenuDialog_construct( ModalDialog& modal, ProjectList& projectLi
 namespace
 {
 CopiedString g_buildMenu;
+CopiedString g_lastExecutedBuild;
 }
 
 void LoadBuildMenu();
@@ -996,6 +997,7 @@ BuildMenuItem( const char* name, GtkMenuItem* item )
        : m_name( name ), m_item( item ){
 }
 void run(){
+       g_lastExecutedBuild = m_name;
        RunBSP( m_name );
 }
 typedef MemberCaller<BuildMenuItem, &BuildMenuItem::run> RunCaller;
@@ -1069,3 +1071,13 @@ void BuildMenu_Construct(){
 void BuildMenu_Destroy(){
        SaveBuildMenu();
 }
+
+
+void Build_runRecentExecutedBuild(){
+       if( g_lastExecutedBuild.empty() ){
+               g_BuildMenuItems.begin()->run();
+       }
+       else{
+               RunBSP( g_lastExecutedBuild.c_str() );
+       }
+}
index 32a39718e2185f9465b4f81f69ce364688ce8353..39024fad1e21b91808f0a98ca7d051f5f3e00c49 100644 (file)
@@ -40,5 +40,6 @@ typedef struct _GtkMenu GtkMenu;
 void Build_constructMenu( GtkMenu* menu );
 extern GtkMenu* g_bsp_menu;
 
+void Build_runRecentExecutedBuild();
 
 #endif
index 753c5077e5998abaf9dd8fce916724acb322e405..5b9eb44a2c52e9f6861c968c475d5d78c51410bd 100644 (file)
@@ -670,8 +670,9 @@ void post( const scene::Path& path, scene::Instance& instance ) const {
                                                delete ( *i );
                                        }
                                }
+                               scene::Node& parent = path.parent();
                                Path_deleteTop( path );
-                               if( Node_getTraversable( path.parent() )->empty() ){
+                               if( Node_getTraversable( parent )->empty() ){
                                        m_eraseParent = true;
                                }
                        }
index 99aa6c26769bffb13f137ac861b8f76fcc5cbf3a..ad0edd774b526451f29458a48bdb9daf85533043 100644 (file)
@@ -180,6 +180,20 @@ bool portable_app_setup(){
        return false;
 }
 
+
+char* openCmdMap;
+
+void cmdMap(){
+       openCmdMap = NULL;
+       for ( int i = 1; i < g_argc; ++i )
+       {
+               //if ( !stricmp( g_argv[i] + strlen(g_argv[i]) - 4, ".map" ) ){
+               if( string_equal_suffix_nocase( g_argv[i], ".map" ) ){
+                       openCmdMap = g_argv[i];
+               }
+       }
+}
+
 #if defined( POSIX )
 
 #include <stdlib.h>
@@ -251,24 +265,13 @@ void environment_init( int argc, char* argv[] ){
                home_path = home.c_str();
        }
        gamedetect();
+       cmdMap();
 }
 
 #elif defined( WIN32 )
 
 #include <windows.h>
 
-char* openCmdMap;
-
-void cmdMap(){
-       openCmdMap = NULL;
-       for ( int i = 1; i < g_argc; ++i )
-       {
-               if ( !stricmp( g_argv[i] + strlen(g_argv[i]) - 4, ".map" ) ){
-                       openCmdMap = g_argv[i];
-               }
-       }
-}
-
 void environment_init( int argc, char* argv[] ){
        args_init( argc, argv );
 
index 18398e8c0d7016e73a50214dfb614f415fc22dd8..b5dc6c1523183aadb8651202eb680187b9c72b67 100644 (file)
@@ -29,9 +29,7 @@ const char* environment_get_app_path();
 extern int g_argc;
 extern char** g_argv;
 
-#if defined( WIN32 )
 extern char* openCmdMap;
-#endif
 
 
 #endif
index 8452a7604c588aa852d432a84bc7fe1cdcd52ff8..88d283207a3c7110f3ce3e6ec4cdf8481d73680f 100644 (file)
@@ -133,7 +133,7 @@ static gint replace_focus_in( GtkWidget* widget, GdkEventFocus *event, gpointer
 
 FindTextureDialog::FindTextureDialog(){
        m_bSelectedOnly = FALSE;
-       //m_position_tracker.setPosition( c_default_window_pos );
+       m_position_tracker.setPosition( WindowPosition( -1, -1, 0, 0 ) );
 }
 
 FindTextureDialog::~FindTextureDialog(){
index f7f6cf6b27265fc6b198e0fbec13f8f2469568c0..d17db3d6aa4f619eb26aedfcaa02d5eac1a47ab3 100644 (file)
@@ -652,13 +652,10 @@ int main( int argc, char* argv[] ){
 
        hide_splash();
 
-#ifdef WIN32
        if( openCmdMap && *openCmdMap ){
                Map_LoadFile( openCmdMap );
        }
-       else
-#endif // WIN32
-       if ( g_bLoadLastMap && !g_strLastMap.empty() ) {
+       else if ( g_bLoadLastMap && !g_strLastMap.empty() ) {
                Map_LoadFile( g_strLastMap.c_str() );
        }
        else
index 9054117abade7d5be53c500a504400d0a1c73af3..0bb43da61d022752d524ed978b0e3f79d243572d 100644 (file)
@@ -135,11 +135,11 @@ struct layout_globals_t
        layout_globals_t() :
                m_position( -1, -1, 640, 480 ),
 
-               nXYHeight( 300 ),
-               nXYWidth( 300 ),
-               nCamWidth( 200 ),
-               nCamHeight( 200 ),
-               nState( GDK_WINDOW_STATE_MAXIMIZED ){
+               nXYHeight( 350 ),
+               nXYWidth( 600 ),
+               nCamWidth( 300 ),
+               nCamHeight( 210 ),
+               nState( 0 ){
        }
 };
 
@@ -2117,6 +2117,7 @@ GtkMenuItem* create_bsp_menu(){
        }
 
        create_menu_item_with_mnemonic( menu, "Customize...", "BuildMenuCustomize" );
+       create_menu_item_with_mnemonic( menu, "Run recent build", "Build_runRecentExecutedBuild" );
 
        menu_separator( menu );
 
@@ -2158,6 +2159,7 @@ GtkMenuItem* create_misc_menu(){
        // http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=394
 //  create_menu_item_with_mnemonic(menu, "_Print XY View", FreeCaller<WXY_Print>());
        create_menu_item_with_mnemonic( menu, "_Background select", FreeCaller<WXY_BackgroundSelect>() );
+       create_menu_item_with_mnemonic( menu, "Fullscreen", "Fullscreen" );
        return misc_menu_item;
 }
 
@@ -2866,19 +2868,9 @@ void MainFrame::Create(){
 #ifdef WIN32
        if ( g_multimon_globals.m_bStartOnPrimMon ) {
                PositionWindowOnPrimaryScreen( g_layout_globals.m_position );
-               window_set_position( window, g_layout_globals.m_position );
        }
-       else
 #endif
-       if ( g_layout_globals.nState & GDK_WINDOW_STATE_MAXIMIZED ) {
-               gtk_window_maximize( window );
-               WindowPosition default_position( -1, -1, 640, 480 );
-               window_set_position( window, default_position );
-       }
-       else
-       {
-               window_set_position( window, g_layout_globals.m_position );
-       }
+       window_set_position( window, g_layout_globals.m_position );
 
        m_window = window;
 
@@ -2898,22 +2890,22 @@ void MainFrame::Create(){
                                gtk_widget_show( vsplit2 );
                                m_vSplit2 = vsplit2;
                                if ( CurrentStyle() == eRegular ){
-                                       gtk_paned_add1( GTK_PANED( hsplit ), vsplit );
-                                       gtk_paned_add2( GTK_PANED( hsplit ), vsplit2 );
+                                       gtk_paned_pack1( GTK_PANED( hsplit ), vsplit, TRUE, TRUE );
+                                       gtk_paned_pack2( GTK_PANED( hsplit ), vsplit2, TRUE, TRUE );
                                }
                                else{
-                                       gtk_paned_add2( GTK_PANED( hsplit ), vsplit );
-                                       gtk_paned_add1( GTK_PANED( hsplit ), vsplit2 );
+                                       gtk_paned_pack2( GTK_PANED( hsplit ), vsplit, TRUE, TRUE );
+                                       gtk_paned_pack1( GTK_PANED( hsplit ), vsplit2, TRUE, TRUE );
                                }
                                // console
                                GtkWidget* console_window = Console_constructWindow( window );
-                               gtk_paned_pack2( GTK_PANED( vsplit ), console_window, FALSE, TRUE );
+                               gtk_paned_pack2( GTK_PANED( vsplit ), console_window, TRUE, TRUE );
 
                                // xy
                                m_pXYWnd = new XYWnd();
                                m_pXYWnd->SetViewType( XY );
                                GtkWidget* xy_window = GTK_WIDGET( create_framed_widget( m_pXYWnd->GetWidget() ) );
-                               gtk_paned_add1( GTK_PANED( vsplit ), xy_window );
+                               gtk_paned_pack1( GTK_PANED( vsplit ), xy_window, TRUE, TRUE );
                                {
                                        // camera
                                        m_pCamWnd = NewCamWnd();
@@ -2921,27 +2913,15 @@ void MainFrame::Create(){
                                        CamWnd_setParent( *m_pCamWnd, window );
                                        GtkFrame* camera_window = create_framed_widget( CamWnd_getWidget( *m_pCamWnd ) );
 
-                                       gtk_paned_add1( GTK_PANED( vsplit2 ), GTK_WIDGET( camera_window ) );
+                                       gtk_paned_pack1( GTK_PANED( vsplit2 ), GTK_WIDGET( camera_window ), TRUE, TRUE );
 
                                        // textures
                                        GtkFrame* texture_window = create_framed_widget( TextureBrowser_constructWindow( window ) );
 
-                                       gtk_paned_add2( GTK_PANED( vsplit2 ), GTK_WIDGET( texture_window ) );
+                                       gtk_paned_pack2( GTK_PANED( vsplit2 ), GTK_WIDGET( texture_window ), TRUE, TRUE );
                                }
                        }
                }
-
-               gtk_paned_set_position( GTK_PANED( m_vSplit ), g_layout_globals.nXYHeight );
-
-               if ( CurrentStyle() == eRegular ) {
-                       gtk_paned_set_position( GTK_PANED( m_hSplit ), g_layout_globals.nXYWidth );
-               }
-               else
-               {
-                       gtk_paned_set_position( GTK_PANED( m_hSplit ), g_layout_globals.nCamWidth );
-               }
-
-               gtk_paned_set_position( GTK_PANED( m_vSplit2 ), g_layout_globals.nCamHeight );
        }
        else if ( CurrentStyle() == eFloating ) {
                {
@@ -3089,6 +3069,25 @@ void MainFrame::Create(){
 
        EverySecondTimer_enable();
 
+       if ( g_layout_globals.nState & GDK_WINDOW_STATE_MAXIMIZED ) {
+               gtk_window_maximize( window );
+       }
+       if ( g_layout_globals.nState & GDK_WINDOW_STATE_FULLSCREEN ) {
+               gtk_window_fullscreen( window );
+       }
+       if ( !FloatingGroupDialog() ) {
+               gtk_paned_set_position( GTK_PANED( m_vSplit ), g_layout_globals.nXYHeight );
+
+               if ( CurrentStyle() == eRegular ) {
+                       gtk_paned_set_position( GTK_PANED( m_hSplit ), g_layout_globals.nXYWidth );
+               }
+               else
+               {
+                       gtk_paned_set_position( GTK_PANED( m_hSplit ), g_layout_globals.nCamWidth );
+               }
+
+               gtk_paned_set_position( GTK_PANED( m_vSplit2 ), g_layout_globals.nCamHeight );
+       }
        //GlobalShortcuts_reportUnregistered();
 }
 
@@ -3107,7 +3106,9 @@ void MainFrame::SaveWindowInfo(){
                g_layout_globals.nCamHeight = gtk_paned_get_position( GTK_PANED( m_vSplit2 ) );
        }
 
-       g_layout_globals.m_position = m_position_tracker.getPosition();
+       if( gdk_window_get_state( GTK_WIDGET( m_window )->window ) == 0 ){
+               g_layout_globals.m_position = m_position_tracker.getPosition();
+       }
 
        g_layout_globals.nState = gdk_window_get_state( GTK_WIDGET( m_window )->window );
 }
@@ -3272,6 +3273,26 @@ void Layout_registerPreferencesPage(){
        PreferencesDialog_addInterfacePage( FreeCaller1<PreferenceGroup&, Layout_constructPage>() );
 }
 
+void MainFrame_toggleFullscreen(){
+       GtkWindow* wnd = MainFrame_getWindow();
+       if( gdk_window_get_state( GTK_WIDGET( wnd )->window ) & GDK_WINDOW_STATE_FULLSCREEN ){
+               //some portion of buttsex, because gtk_window_unfullscreen doesn't work correctly after calling some modal window
+               bool maximize = ( gdk_window_get_state( GTK_WIDGET( wnd )->window ) & GDK_WINDOW_STATE_MAXIMIZED );
+               gtk_window_unfullscreen( wnd );
+               if( maximize ){
+                       gtk_window_unmaximize( wnd );
+                       gtk_window_maximize( wnd );
+               }
+               else{
+                       gtk_window_move( wnd, g_layout_globals.m_position.x, g_layout_globals.m_position.y );
+                       gtk_window_resize( wnd, g_layout_globals.m_position.w, g_layout_globals.m_position.h );
+               }
+       }
+       else{
+               gtk_window_fullscreen( wnd );
+       }
+}
+
 
 #include "preferencesystem.h"
 #include "stringio.h"
@@ -3334,6 +3355,7 @@ void MainFrame_Construct(){
        GlobalCommands_insert( "ArbitraryScale", FreeCaller<DoScaleDlg>(), Accelerator( 'S', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
 
        GlobalCommands_insert( "BuildMenuCustomize", FreeCaller<DoBuildMenu>() );
+       GlobalCommands_insert( "Build_runRecentExecutedBuild", FreeCaller<Build_runRecentExecutedBuild>(), Accelerator( GDK_F5 ) );
 
        GlobalCommands_insert( "FindBrush", FreeCaller<DoFind>() );
 
@@ -3369,6 +3391,8 @@ void MainFrame_Construct(){
        GlobalCommands_insert( "ChooseClipperColor", makeCallback( g_ColoursMenu.m_clipper ) );
        GlobalCommands_insert( "ChooseOrthoViewNameColor", makeCallback( g_ColoursMenu.m_viewname ) );
 
+       GlobalCommands_insert( "Fullscreen", FreeCaller<MainFrame_toggleFullscreen>(), Accelerator( GDK_F11 ) );
+
 
        GlobalCommands_insert( "CSGSubtract", FreeCaller<CSG_Subtract>(), Accelerator( 'U', (GdkModifierType)GDK_SHIFT_MASK ) );
        GlobalCommands_insert( "CSGMerge", FreeCaller<CSG_Merge>(), Accelerator( 'U', (GdkModifierType)GDK_CONTROL_MASK ) );
index a66229b73435b69dba3893e911c061f7068135a4..4040ab3cd822d3da8b39b174152af9b9c6790179 100644 (file)
@@ -1842,9 +1842,7 @@ void SaveMap(){
        }
        else if ( Map_Modified( g_map ) ) {
                Map_Save();
-#ifdef WIN32
                MRU_AddFile( g_map.m_name.c_str() );    //add on saving, but not opening via cmd line: spoils the list
-#endif
        }
 }
 
index 1904867b949c0eeec93aacf717a4853d975f022a..aad08221da63c23ff317a02b491387a7ff6e873f 100644 (file)
@@ -144,6 +144,10 @@ FunctionPointer findSymbol( const char* symbol ){
 
 #include <dlfcn.h>
 
+#ifndef RTLD_DEEPBIND
+#define RTLD_DEEPBIND 0
+#endif
+
 class DynamicLibrary
 {
 void* m_library;
@@ -151,7 +155,7 @@ public:
 typedef int ( *FunctionPointer )();
 
 DynamicLibrary( const char* filename ){
-       m_library = dlopen( filename, RTLD_NOW );
+       m_library = dlopen( filename, RTLD_NOW | (RTLD_DEEPBIND + 0) );
 }
 ~DynamicLibrary(){
        if ( !failed() ) {
index ae89a127752eddba8103f2ff380e440a1bcab7e9..e15d5612cf2ec303080ba83a524a28d4966b0ac1 100644 (file)
@@ -95,10 +95,11 @@ brush_t *AllocBrush( int numSides ){
 
 
        /* allocate and clear */
-       if ( numSides <= 0 ) {
+       /*if ( numSides <= 0 ) {
                Error( "AllocBrush called with numsides = %d", numSides );
        }
-       c = (size_t)&( ( (brush_t*) 0 )->sides[ numSides ] );
+       c = (size_t)&( ( (brush_t*) 0 )->sides[ numSides ] );*/
+       c = sizeof(*bb) + (numSides > 6 ? sizeof(side_t)*(numSides - 6) : 0);
        bb = safe_malloc( c );
        memset( bb, 0, c );
        if ( numthreads == 1 ) {
index e5e4055f3232e0ceddca56d21080f5b97150aee0..6ec7e21c0e6c7b140747a275c96da736bb341620 100644 (file)
@@ -630,10 +630,9 @@ void InjectCommandLine( char **argv, int beginArgs, int endArgs ){
        char *sentinel = newCommandLine + sizeof( newCommandLine ) - 1;
        int i;
 
-if (nocmdline)
-{
-       return;
-}
+       if ( nocmdline ){
+               return;
+       }
        previousCommandLine = ValueForKey( &entities[0], "_q3map2_cmdline" );
        if ( previousCommandLine && *previousCommandLine ) {
                inpos = previousCommandLine;
index 6ee40957e96f9f6ecf25177f986c65c54f1b74e7..fe097bef79dfa9374c8009f42a7c29dcac16b150 100644 (file)
@@ -2383,8 +2383,14 @@ skipEXfile:
                                Sys_Printf( "++%s\n", temp );
                                continue;
                        }
-                       Sys_Printf( "  !FAIL! %s\n", pk3Shaders + i*65 );
-                       if ( i != pk3ShadersN - 1 ) packFAIL = qtrue; //levelshot typically
+
+                       if ( i == pk3ShadersN - 1 ){ //levelshot typically
+                               Sys_Printf( "  ~fail  %s\n", pk3Shaders + i*65 );
+                       }
+                       else{
+                               Sys_Printf( "  !FAIL! %s\n", pk3Shaders + i*65 );
+                               packFAIL = qtrue;
+                       }
                }
        }
 
@@ -2443,7 +2449,7 @@ skipEXfile:
                        Sys_Printf( "++%s\n", temp );
                }
        else{
-               Sys_Printf( "  !FAIL! %s\n", temp );
+               Sys_Printf( "  ~fail  %s\n", temp );
        }
 
        sprintf( temp, "scripts/%s.arena", nameOFmap );
@@ -2451,7 +2457,7 @@ skipEXfile:
                        Sys_Printf( "++%s\n", temp );
                }
        else{
-               Sys_Printf( "  !FAIL! %s\n", temp );
+               Sys_Printf( "  ~fail  %s\n", temp );
        }
 
        sprintf( temp, "scripts/%s.defi", nameOFmap );
@@ -2459,7 +2465,7 @@ skipEXfile:
                        Sys_Printf( "++%s\n", temp );
                }
        else{
-               Sys_Printf( "  !FAIL! %s\n", temp );
+               Sys_Printf( "  ~fail  %s\n", temp );
        }
 
        if ( !packFAIL ){
index fbc2b5e52d8100e4013cfb93cc066434c691c082..0629d442b8af8231eb40388c9bb089dae838b477 100644 (file)
@@ -2003,11 +2003,10 @@ Q_EXTERN qboolean warnImage Q_ASSIGN( qtrue );
 /* ydnar: sinusoid samples */
 Q_EXTERN float jitters[ MAX_JITTERS ];
 
-/*can't code*/
+/* can't code */
 Q_EXTERN qboolean doingBSP Q_ASSIGN( qfalse );
 
 /* commandline arguments */
-Q_EXTERN qboolean                      nocmdline Q_ASSIGN( qfalse );
 Q_EXTERN qboolean verbose;
 Q_EXTERN qboolean verboseEntities Q_ASSIGN( qfalse );
 Q_EXTERN qboolean force Q_ASSIGN( qfalse );
@@ -2030,6 +2029,7 @@ Q_EXTERN qboolean skyFixHack Q_ASSIGN( qfalse );                    /* ydnar */
 Q_EXTERN qboolean bspAlternateSplitWeights Q_ASSIGN( qfalse );                      /* 27 */
 Q_EXTERN qboolean deepBSP Q_ASSIGN( qfalse );                   /* div0 */
 Q_EXTERN qboolean maxAreaFaceSurface Q_ASSIGN( qfalse );                    /* divVerent */
+Q_EXTERN qboolean nocmdline Q_ASSIGN( qfalse );
 
 Q_EXTERN int patchSubdivisions Q_ASSIGN( 8 );                       /* ydnar: -patchmeta subdivisions */
 
index a4453374a24f5d8e255cbee49c4e71ec3498d22f..3d5249ef1f41f9c305acc20dddf79af8096152b1 100644 (file)
@@ -1276,7 +1276,7 @@ static void ParseShaderFile( const char *filename ){
                        else if ( !Q_stricmp( token, "sun" ) /* sof2 */ || !Q_stricmp( token, "q3map_sun" ) || !Q_stricmp( token, "q3map_sunExt" ) ) {
                                float a, b;
                                sun_t       *sun;
-                               qboolean ext;
+                               qboolean ext = qfalse;
 
 
                                /* ydnar: extended sun directive? */
index 5aa290f9cc5798d48fe179410e71e13266476b71..18c115ee6e1938569ce6799d07fac321f9512ea0 100644 (file)
@@ -1164,7 +1164,7 @@ mapDrawSurface_t *DrawSurfaceForMesh( entity_t *e, parseMesh_t *p, mesh_t *mesh
 
        /* spew forth errors */
        if ( VectorLength( plane ) < 0.001f ) {
-               Sys_Printf( "BOGUS " );
+               Sys_Printf( "DrawSurfaceForMesh: bogus plane\n" );
        }
 
        /* test each vert */