diff --git a/radiant/watchbsp.cpp b/radiant/watchbsp.cpp index c9d1e079..59bf7533 100644 --- a/radiant/watchbsp.cpp +++ b/radiant/watchbsp.cpp @@ -289,18 +289,21 @@ static void saxStartElement( message_info_t *data, const xmlChar *name, const xm data->pGeometry->saxStartElement( data, name, attrs ); } else if ( strcmp( reinterpret_cast( name ), "select" ) == 0 ) { + message_flush( data ); CSelectMsg *pSelect = new CSelectMsg(); data->geometry_depth = data->recurse; data->pGeometry = pSelect; data->pGeometry->saxStartElement( data, name, attrs ); } else if ( strcmp( reinterpret_cast( name ), "pointmsg" ) == 0 ) { + message_flush( data ); CPointMsg *pPoint = new CPointMsg(); data->geometry_depth = data->recurse; data->pGeometry = pPoint; data->pGeometry->saxStartElement( data, name, attrs ); } else if ( strcmp( reinterpret_cast( name ), "windingmsg" ) == 0 ) { + message_flush( data ); CWindingMsg *pWinding = new CWindingMsg(); data->geometry_depth = data->recurse; data->pGeometry = pWinding; @@ -308,6 +311,7 @@ static void saxStartElement( message_info_t *data, const xmlChar *name, const xm } else { + message_flush( data ); globalWarningStream() << "Warning: ignoring unrecognized node in XML stream (" << reinterpret_cast( name ) << ")\n"; // we don't recognize this node, jump over it // (NOTE: the ignore mechanism is a bit screwed, only works when starting an ignore at the highest level) diff --git a/tools/quake3/common/inout.c b/tools/quake3/common/inout.c index 58694554..1cf7dcba 100644 --- a/tools/quake3/common/inout.c +++ b/tools/quake3/common/inout.c @@ -68,8 +68,12 @@ xmlNodePtr xml_NodeForVec( vec3_t v ){ return ret; } +void xml_message_flush(); + // send a node down the stream, add it to the document void xml_SendNode( xmlNodePtr node ){ + xml_message_flush(); /* flush regular print messages buffer, so that special ones will appear at correct spot */ + xmlBufferPtr xml_buf; char xmlbuf[MAX_NETMESSAGE]; // we have to copy content from the xmlBufferPtr into an aux buffer .. that sucks .. // this index loops through the node buffer @@ -162,7 +166,6 @@ void xml_Select( char *msg, int entitynum, int brushnum, qboolean bError ){ else{ Sys_FPrintf( SYS_NOXMLflag | SYS_WRN, "%s\n", buf ); } - } void xml_Point( char *msg, vec3_t pt ){ diff --git a/tools/quake3/common/inout.h b/tools/quake3/common/inout.h index 7886c522..6fe911f1 100644 --- a/tools/quake3/common/inout.h +++ b/tools/quake3/common/inout.h @@ -29,7 +29,6 @@ // some useful xml routines xmlNodePtr xml_NodeForVec( vec3_t v ); void xml_SendNode( xmlNodePtr node ); -void xml_message_flush(); // print a message in q3map output and send the corresponding select information down the xml stream // bError: do we end with an error on this one or do we go ahead? void xml_Select( char *msg, int entitynum, int brushnum, qboolean bError ); diff --git a/tools/quake3/common/scriplib.c b/tools/quake3/common/scriplib.c index 2cd63d66..3def0d58 100644 --- a/tools/quake3/common/scriplib.c +++ b/tools/quake3/common/scriplib.c @@ -68,7 +68,7 @@ void AddScriptToStack( const char *filename, int index ){ size = vfsLoadFile( script->filename, (void **)&script->buffer, index ); if ( size == -1 ) { - Sys_Printf( "Script file %s was not found\n", script->filename ); + Sys_FPrintf( SYS_WRN, "Script file %s was not found\n", script->filename ); } else { @@ -118,7 +118,7 @@ void SilentLoadScriptFile( const char *filename, int index ){ size = vfsLoadFile( script->filename, (void **)&script->buffer, index ); if ( size == -1 ) { - Sys_Printf( "Script file %s was not found\n", script->filename ); + Sys_FPrintf( SYS_WRN, "Script file %s was not found\n", script->filename ); } script->line = 1; script->script_p = script->buffer; diff --git a/tools/quake3/q3map2/bsp.c b/tools/quake3/q3map2/bsp.c index 2ece0aae..b1d86421 100644 --- a/tools/quake3/q3map2/bsp.c +++ b/tools/quake3/q3map2/bsp.c @@ -348,7 +348,6 @@ void ProcessWorldModel( void ){ Sys_FPrintf( SYS_NOXMLflag | SYS_ERR, "******* leaked *******\n" ); Sys_FPrintf( SYS_NOXMLflag | SYS_ERR, "**********************\n" ); polyline = LeakFile( tree ); - xml_message_flush(); leaknode = xmlNewNode( NULL, (xmlChar*)"message" ); xmlNodeAddContent( leaknode, (xmlChar*)"MAP LEAKED\n" ); xmlAddChild( leaknode, polyline ); diff --git a/tools/quake3/q3map2/portals.c b/tools/quake3/q3map2/portals.c index ffd3ef60..a9c5c1f7 100644 --- a/tools/quake3/q3map2/portals.c +++ b/tools/quake3/q3map2/portals.c @@ -747,7 +747,7 @@ int FloodEntities( tree_t *tree ){ inside = qtrue; } if ( !r ) { - Sys_Printf( "Entity %i, Brush %i: Entity in solid\n", e->mapEntityNum, 0 ); + Sys_FPrintf( SYS_WRN, "Entity %i, Brush %i: Entity in solid\n", e->mapEntityNum, 0 ); } else if ( tree->outside_node.occupied ) { if ( !tripped || tree->outside_node.occupied < tripcount ) {