mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
the parameter check for '-novid' has been removed from S2 onwards, but later added back in. Our S3 build doesn't have it as well. This commit adds it back in and allows user to launch the game without the startup video's by adding '-novid' to the launch arguments. ('-dev' also works, but this enables developer and sv_cheats..).
30 lines
885 B
C++
30 lines
885 B
C++
//===== Copyright <20> 1996-2005, Valve Corporation, All rights reserved. ======//
|
||
//
|
||
// Purpose:
|
||
//
|
||
//===========================================================================//
|
||
#include "core/stdafx.h"
|
||
#include "tier0/commandline.h"
|
||
#include "engine/sys_mainwind.h"
|
||
|
||
//-----------------------------------------------------------------------------
|
||
// Purpose: plays the startup video's
|
||
//-----------------------------------------------------------------------------
|
||
void CGame::PlayStartupVideos(void)
|
||
{
|
||
if (!CommandLine()->CheckParm("-novid"))
|
||
{
|
||
v_CGame__PlayStartupVideos();
|
||
}
|
||
}
|
||
|
||
///////////////////////////////////////////////////////////////////////////////
|
||
void SysGame_Attach()
|
||
{
|
||
DetourAttach((LPVOID*)&v_CGame__PlayStartupVideos, &CGame::PlayStartupVideos);
|
||
}
|
||
|
||
void SysGame_Detach()
|
||
{
|
||
DetourDetach((LPVOID*)&v_CGame__PlayStartupVideos, &CGame::PlayStartupVideos);
|
||
} |