Fix a video playback issue related to 'playvideo'

There is currently a bug that prohibits 'playvideo' from successfully playing media in-game, as the player must firstly go to the main menu for it to play, this issue makes sure that the command can work without having the player go to the menu.
This commit is contained in:
Avanate 2019-10-07 17:33:49 +03:00 committed by GitHub
parent 756caa92e4
commit 0f695ee664
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ VideoPanel::VideoPanel( unsigned int nXPos, unsigned int nYPos, unsigned int nHe
m_nPlaybackHeight( 0 ),
m_bAllowAlternateMedia( allowAlternateMedia )
{
vgui::VPANEL pParent = enginevgui->GetPanel( PANEL_GAMEUIDLL );
vgui::VPANEL pParent = enginevgui->GetPanel( PANEL_ROOT );
SetParent( pParent );
SetVisible( false );
@ -420,4 +420,4 @@ CON_COMMAND( playvideo_exitcommand, "Plays a video and fires and exit command wh
Warning( "Unable to play video: %s\n", strFullpath );
engine->ClientCmd( pExitCommand );
}
}
}