mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-12 16:18:01 +00:00
utils: mdldec: return different errorcodes on error.
This commit is contained in:
parent
6d318a4102
commit
f343f0da41
@ -266,6 +266,8 @@ static void ShowHelp( const char *app_name )
|
|||||||
|
|
||||||
int main( int argc, char *argv[] )
|
int main( int argc, char *argv[] )
|
||||||
{
|
{
|
||||||
|
int ret = 0;
|
||||||
|
|
||||||
puts( "\nHalf-Life Studio Model Decompiler " APP_VERSION );
|
puts( "\nHalf-Life Studio Model Decompiler " APP_VERSION );
|
||||||
puts( "Copyright Flying With Gauss 2020 (c) " );
|
puts( "Copyright Flying With Gauss 2020 (c) " );
|
||||||
puts( "--------------------------------------------------" );
|
puts( "--------------------------------------------------" );
|
||||||
@ -273,6 +275,7 @@ int main( int argc, char *argv[] )
|
|||||||
if( argc == 1 )
|
if( argc == 1 )
|
||||||
{
|
{
|
||||||
ShowHelp( argv[0] );
|
ShowHelp( argv[0] );
|
||||||
|
ret = 2;
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
else if( argc == 3 )
|
else if( argc == 3 )
|
||||||
@ -280,6 +283,7 @@ int main( int argc, char *argv[] )
|
|||||||
if( Q_strlen( argv[2] ) > MAX_SYSPATH - 2 )
|
if( Q_strlen( argv[2] ) > MAX_SYSPATH - 2 )
|
||||||
{
|
{
|
||||||
fputs( "ERROR: Destination path is too long.\n", stderr );
|
fputs( "ERROR: Destination path is too long.\n", stderr );
|
||||||
|
ret = 1;
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -287,7 +291,10 @@ int main( int argc, char *argv[] )
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( !LoadActivityList( argv[0] ) || !LoadMDL( argv[1] ) )
|
if( !LoadActivityList( argv[0] ) || !LoadMDL( argv[1] ) )
|
||||||
|
{
|
||||||
|
ret = 1;
|
||||||
goto end;
|
goto end;
|
||||||
|
}
|
||||||
|
|
||||||
WriteQCScript();
|
WriteQCScript();
|
||||||
WriteSMD();
|
WriteSMD();
|
||||||
@ -298,6 +305,6 @@ int main( int argc, char *argv[] )
|
|||||||
end:
|
end:
|
||||||
puts( "--------------------------------------------------" );
|
puts( "--------------------------------------------------" );
|
||||||
|
|
||||||
return 0;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user