utils: mdldec: write all GoldSource-compatible motion-types with "-m" option.

This commit is contained in:
Andrey Akhmichin
2025-05-11 02:00:48 +05:00
committed by Alibek Omarov
parent 94791d3cb6
commit a479099804
2 changed files with 45 additions and 12 deletions

View File

@@ -534,7 +534,7 @@ static void ShowHelp( const char *app_name )
LogPutS( "\noptions:" );
LogPutS( "\t-a\tplace files with animations to separate directory." );
LogPutS( "\t-l\tdo not output logs." );
LogPutS( "\t-m\tuse only GoldSource-compatible motion types and ignore deprecated motion types with \"A\" prefix." );
LogPutS( "\t-m\tuse GoldSource-compatible motion types." );
LogPutS( "\t-t\tplace texture files to separate directory." );
LogPutS( "\t-u\tenable UV coords shifting for DoomMusic's and Sven-Coop's studio model compilers." );
LogPutS( "\t-V\tignore some validation checks for broken models." );

View File

@@ -140,17 +140,37 @@ static void GetMotionTypeString( int type, char *str, size_t size, qboolean is_c
if( type & STUDIO_ZR )
Q_strncat( str, " ZR", size );
if( !( globalsettings & SETTINGS_LEGACYMOTION ))
if( type & STUDIO_LX )
Q_strncat( str, " LX", size );
if( type & STUDIO_LY )
Q_strncat( str, " LY", size );
if( type & STUDIO_LZ )
Q_strncat( str, " LZ", size );
if( globalsettings & SETTINGS_LEGACYMOTION )
{
if( type & STUDIO_LX )
Q_strncat( str, " LX", size );
if( type & STUDIO_LXR )
Q_strncat( str, " AX", size );
if( type & STUDIO_LY )
Q_strncat( str, " LY", size );
if( type & STUDIO_LYR )
Q_strncat( str, " AY", size );
if( type & STUDIO_LZ )
Q_strncat( str, " LZ", size );
if( type & STUDIO_LZR )
Q_strncat( str, " AZ", size );
if( type & STUDIO_LINEAR )
Q_strncat( str, " AXR", size );
if( type & STUDIO_QUADRATIC_MOTION )
Q_strncat( str, " AYR", size );
if( type & STUDIO_RESERVED )
Q_strncat( str, " AZR", size );
}
else
{
if( type & STUDIO_LXR )
Q_strncat( str, " LXR", size );
@@ -179,16 +199,29 @@ static void GetMotionTypeString( int type, char *str, size_t size, qboolean is_c
case STUDIO_XR: p = "XR"; break;
case STUDIO_YR: p = "YR"; break;
case STUDIO_ZR: p = "ZR"; break;
case STUDIO_LX: p = "LX"; break;
case STUDIO_LY: p = "LY"; break;
case STUDIO_LZ: p = "LZ"; break;
default: break;
}
if( !( globalsettings & SETTINGS_LEGACYMOTION ))
if( globalsettings & SETTINGS_LEGACYMOTION )
{
switch( type )
{
case STUDIO_LXR: p = "AX"; break;
case STUDIO_LYR: p = "AY"; break;
case STUDIO_LZR: p = "AZ"; break;
case STUDIO_LINEAR: p = "AXR"; break;
case STUDIO_QUADRATIC_MOTION: p = "AYR"; break;
case STUDIO_RESERVED: p = "AZR"; break;
default: break;
}
}
else
{
switch( type )
{
case STUDIO_LX: p = "LX"; break;
case STUDIO_LY: p = "LY"; break;
case STUDIO_LZ: p = "LZ"; break;
case STUDIO_LXR: p = "LXR"; break;
case STUDIO_LYR: p = "LYR"; break;
case STUDIO_LZR: p = "LZR"; break;