mirror of
https://github.com/Garux/netradiant-custom.git
synced 2026-09-28 00:00:03 +02:00
* -modelclip: Decompile model autoclip brushes during bsp to map conversion (they are skipped by default)
explicit setting instead of reusing -force
This commit is contained in:
@@ -104,7 +104,7 @@ td.formatted_questions ol { margin-top: 0px; margin-bottom: 0px; }
|
||||
<h2 id="Common-options">Common options<a href="#Common-options" class="wiki-anchor">¶</a></h2>
|
||||
<ul>
|
||||
<li><strong><code>-connect</code> address:</strong> Talk to a NetRadiant instance using a specific XML based protocol</li>
|
||||
<li><strong><code>-force</code>:</strong> Allow reading some broken/unsupported BSP files e.g. when decompiling, may crash. Also enables decompilation of model autoclip brushes.</li>
|
||||
<li><strong><code>-force</code>:</strong> Allow reading some broken/unsupported BSP files e.g. when decompiling, may crash</li>
|
||||
<li><strong><code>-fs_basepath</code> path:</strong> Sets the given path as main directory of the game (can be used more than once to look in multiple paths)</li>
|
||||
<li><strong><code>-fs_forbiddenpath</code> pattern:</strong> Pattern to ignore directories, pk3, and pk3dir; example pak?.pk3 (can be used more than once to look for multiple patterns)</li>
|
||||
<li><strong><code>-fs_game</code> gamename:</strong> Sets extra game directory name to additionally load mod's resources from at higher priority (by default for Q3A 'baseq3' is loaded, -fs_game cpma will also load 'cpma'; can be used more than once)</li>
|
||||
@@ -325,6 +325,7 @@ td.formatted_questions ol { margin-top: 0px; margin-bottom: 0px; }
|
||||
<li><strong><code>-format</code> converter:</strong> Select the converter, default ase (available: map, map_bp, ase, obj, or game names)</li>
|
||||
<li><strong><code>-lightmapsastexcoord</code>:</strong> Save lightmap names and texcoords instead of textures (only when writing ase and obj)</li>
|
||||
<li><strong><code>-meta</code>:</strong> Combine adjacent triangles of the same texture to surfaces (only when reading map)</li>
|
||||
<li><strong><code>-modelclip</code>:</strong> Decompile model autoclip brushes during bsp to map conversion (they are skipped by default)</li>
|
||||
<li><strong><code>-ne</code> F:</strong> Normal epsilon for the conversion (only when reading map)</li>
|
||||
<li><strong><code>-patchmeta</code>:</strong> Turn patches into triangle meshes for display (only when reading map)</li>
|
||||
<li><strong><code>-readbsp</code>:</strong> Force converting bsp to selected format</li>
|
||||
|
||||
@@ -186,6 +186,7 @@ Q3map2:
|
||||
* fix and simplify FloodAreas
|
||||
* support distinct lighting from different sky shaders in one map (by Tom Arrow)
|
||||
* -onesky: fallback to old behavior: any sky emits total of all suns/skylights in the map
|
||||
* -modelclip: Decompile model autoclip brushes during bsp to map conversion (they are skipped by default)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1107,6 +1107,9 @@ int ConvertBSPMain( Args& args ){
|
||||
while ( args.takeArg( "-fast" ) ) {
|
||||
fast = true;
|
||||
}
|
||||
while ( args.takeArg( "-modelclip" ) ) {
|
||||
g_decompile_modelClip = true;
|
||||
}
|
||||
}
|
||||
|
||||
LoadShaderInfo();
|
||||
|
||||
@@ -195,8 +195,8 @@ static void bspBrush_to_buildBrush( const bspBrush_t& brush ){
|
||||
buildBrush.sides.clear();
|
||||
|
||||
bool modelclip = false;
|
||||
/* try to guess if thats model clip */
|
||||
if ( force ){
|
||||
/* try to guess if this is model clip */
|
||||
if ( g_decompile_modelClip ){
|
||||
int notNoShader = 0;
|
||||
modelclip = true;
|
||||
for ( const bspBrushSide_t& side : Span( &bspBrushSides[ brush.firstSide ], brush.numSides ) )
|
||||
|
||||
@@ -317,6 +317,7 @@ static void HelpConvert()
|
||||
{ "-format <converter>", "Select the converter, default ase (available: map, map_bp, ase, obj, or game names)" },
|
||||
{ "-lightmapsastexcoord", "Save lightmap names and texcoords instead of textures (only when writing ase and obj)" },
|
||||
{ "-meta", "Combine adjacent triangles of the same texture to surfaces (only when reading map)" },
|
||||
{ "-modelclip", "Decompile model autoclip brushes during bsp to map conversion (they are skipped by default)" },
|
||||
{ "-ne <F>", "Normal epsilon for the conversion (only when reading map)" },
|
||||
{ "-patchmeta", "Turn patches into triangle meshes for display (only when reading map)" },
|
||||
{ "-readbsp", "Force converting bsp to selected format" },
|
||||
@@ -450,7 +451,7 @@ static void HelpCommon()
|
||||
{
|
||||
const std::vector<HelpOption> options = {
|
||||
{ "-connect <address>", "Talk to a NetRadiant instance using a specific XML based protocol" },
|
||||
{ "-force", "Allow reading some broken/unsupported BSP files e.g. when decompiling, may crash. Also enables decompilation of model autoclip brushes." },
|
||||
{ "-force", "Allow reading some broken/unsupported BSP files e.g. when decompiling, may crash" },
|
||||
{ "-fs_basepath <path>", "Sets the given path as main directory of the game (can be used more than once to look in multiple paths)" },
|
||||
{ "-fs_forbiddenpath <pattern>", "Pattern to ignore directories, pk3, and pk3dir; example pak?.pk3 (can be used more than once to look for multiple patterns)" },
|
||||
{ "-fs_game <gamename>", "Sets extra game directory name to additionally load mod's resources from at higher priority (by default for Q3A 'baseq3' is loaded, -fs_game cpma will also load 'cpma'; can be used more than once)" },
|
||||
|
||||
@@ -1776,6 +1776,8 @@ inline bool doingBSP;
|
||||
// for .ase conversion
|
||||
inline bool shadersAsBitmap;
|
||||
inline bool lightmapsAsTexcoord;
|
||||
// bsp to map conversion
|
||||
inline bool g_decompile_modelClip;
|
||||
|
||||
/* general commandline arguments */
|
||||
inline bool force;
|
||||
|
||||
Reference in New Issue
Block a user