engine: allow specifying screenshot filenames in command directly

This commit is contained in:
Ivan Avdeev 2023-11-20 13:01:01 -05:00
parent 17267fd8c3
commit a6fe7cc3a6
1 changed files with 6 additions and 1 deletions

View File

@ -192,7 +192,12 @@ void CL_ScreenShot_f( void )
int i;
string checkname;
if( CL_IsDevOverviewMode() == 1 )
if ( Cmd_Argc() > 1)
{
Q_strncpy( cls.shotname, Cmd_Argv( 1 ), sizeof( cls.shotname ));
cls.scrshot_action = scrshot_normal; // build new frame for screenshot
}
else if( CL_IsDevOverviewMode() == 1 )
{
// special case for write overview image and script file
Q_snprintf( cls.shotname, sizeof( cls.shotname ), "overviews/%s.bmp", clgame.mapname );