* automatically add ExtraResoucePath to q3map2 arguments, if set

This commit is contained in:
Garux
2021-05-08 10:48:06 +03:00
parent 72248bd95f
commit d1dcc29fa0
2 changed files with 7 additions and 0 deletions

View File

@@ -258,6 +258,11 @@ public:
void flush(){
if ( !m_buffer.empty() ) {
m_tool.push_back( new VariableString( m_buffer.c_str() ) );
// q3map2 ExtraResoucePath hack
if( strstr( m_buffer.c_str(), "[RadiantPath]q3map2.[ExecutableType]" ) != nullptr // is q3map2
&& strstr( m_buffer.c_str(), "[ExtraResoucePath]" ) == nullptr ){ // has no extra path right away (could have been added by this before)
m_tool.push_back( new VariableString( "[ExtraResoucePath]" ) );
}
m_buffer.clear();
}
}