aboutsummaryrefslogtreecommitdiff
path: root/mp/src/game/client/cdll_client_int.cpp
diff options
context:
space:
mode:
authorJoe Ludwig <[email protected]>2013-12-03 08:54:16 -0800
committerJoe Ludwig <[email protected]>2013-12-03 08:54:16 -0800
commitbeaae8ac45a2f322a792404092d4482065bef7ef (patch)
tree747f35193ba235f0f0b070c05b53468a54559c8e /mp/src/game/client/cdll_client_int.cpp
parentMake .xcconfigs text files too. (diff)
downloadsource-sdk-2013-beaae8ac45a2f322a792404092d4482065bef7ef.tar.xz
source-sdk-2013-beaae8ac45a2f322a792404092d4482065bef7ef.zip
Updated the SDK with the latest code from the TF and HL2 branches
* Adds support for Visual Studio 2012 and 2013 * VR Mode: . Switches from headtrack.dll to sourcevr.dll . Improved readability of the UI in VR . Removed the IPD calibration tool. TF2 will now obey the Oculus configuration file. Use the Oculus calibration tool in your SDK or install and run "OpenVR" under Tools in Steam to calibrate your IPD. . Added dropdown to enable VR mode in the Video options. Removed the -vr command line option. . Added the ability to switch in and out of VR mode without quitting the game . By default VR mode will run full screen. To switch back to a borderless window set the vr_force_windowed convar. . Added support for VR mode on Linux * Many assorted bug fixes and other changes from Team Fortress in various shared files
Diffstat (limited to 'mp/src/game/client/cdll_client_int.cpp')
-rw-r--r--mp/src/game/client/cdll_client_int.cpp56
1 files changed, 22 insertions, 34 deletions
diff --git a/mp/src/game/client/cdll_client_int.cpp b/mp/src/game/client/cdll_client_int.cpp
index 0f40f2d3..b5a53e72 100644
--- a/mp/src/game/client/cdll_client_int.cpp
+++ b/mp/src/game/client/cdll_client_int.cpp
@@ -121,7 +121,7 @@
#include "clientsteamcontext.h"
#include "renamed_recvtable_compat.h"
#include "mouthinfo.h"
-#include "headtrack/isourcevirtualreality.h"
+#include "sourcevr/isourcevirtualreality.h"
#include "client_virtualreality.h"
#include "mumble.h"
@@ -148,7 +148,6 @@
#endif
extern vgui::IInputInternal *g_InputInternal;
-const char *COM_GetModDirectory(); // return the mod dir (rather than the complete -game param, which can be a path)
//=============================================================================
// HPE_BEGIN
@@ -332,6 +331,11 @@ static ConVar s_CV_ShowParticleCounts("showparticlecounts", "0", 0, "Display num
static ConVar s_cl_team("cl_team", "default", FCVAR_USERINFO|FCVAR_ARCHIVE, "Default team when joining a game");
static ConVar s_cl_class("cl_class", "default", FCVAR_USERINFO|FCVAR_ARCHIVE, "Default class when joining a game");
+#ifdef HL1MP_CLIENT_DLL
+static ConVar s_cl_load_hl1_content("cl_load_hl1_content", "0", FCVAR_ARCHIVE, "Mount the content from Half-Life: Source if possible");
+#endif
+
+
// Physics system
bool g_bLevelInitialized;
bool g_bTextMode = false;
@@ -943,7 +947,7 @@ int CHLClient::Init( CreateInterfaceFn appSystemFactory, CreateInterfaceFn physi
InitFbx();
#endif
- // it's ok if this is NULL. That just means the headtrack.dll wasn't found
+ // it's ok if this is NULL. That just means the sourcevr.dll wasn't found
g_pSourceVR = (ISourceVirtualReality *)appSystemFactory(SOURCE_VIRTUAL_REALITY_INTERFACE_VERSION, NULL);
factorylist_t factories;
@@ -977,17 +981,6 @@ int CHLClient::Init( CreateInterfaceFn appSystemFactory, CreateInterfaceFn physi
g_pcv_ThreadMode = g_pCVar->FindVar( "host_thread_mode" );
- // If we are in VR mode do some initial setup work
- if( UseVR() )
- {
- int nViewportWidth, nViewportHeight;
-
- g_pSourceVR->GetViewportBounds( ISourceVirtualReality::VREye_Left, NULL, NULL, &nViewportWidth, &nViewportHeight );
- vgui::surface()->SetFullscreenViewport( 0, 0, nViewportWidth, nViewportHeight );
-
- vgui::ivgui()->SetVRMode( true );
- }
-
if (!Initializer::InitializeAllObjects())
return false;
@@ -1091,6 +1084,7 @@ int CHLClient::Init( CreateInterfaceFn appSystemFactory, CreateInterfaceFn physi
#ifndef _X360
HookHapticMessages(); // Always hook the messages
#endif
+
return true;
}
@@ -1141,29 +1135,23 @@ void CHLClient::PostInit()
g_pSixenseInput->PostInit();
#endif
- // If we are in VR mode execute headtrack.cfg in PostInit so all the convars will
- // already be set up
- if( UseVR() )
- {
- // general all-game stuff
- engine->ExecuteClientCmd( "exec headtrack\\headtrack.cfg" );
-
- // game specific VR config
- CUtlString sCmd;
- sCmd.Format( "exec headtrack_%s.cfg", COM_GetModDirectory() );
- engine->ExecuteClientCmd( sCmd.Get() );
+ g_ClientVirtualReality.StartupComplete();
- engine->ExecuteClientCmd( "vr_start_tracking" );
-
- vgui::surface()->SetSoftwareCursor( true );
-#if defined(POSIX)
- ConVarRef m_rawinput( "m_rawinput" );
- m_rawinput.SetValue( 1 );
+#ifdef HL1MP_CLIENT_DLL
+ if ( s_cl_load_hl1_content.GetBool() && steamapicontext && steamapicontext->SteamApps() )
+ {
+ char szPath[ MAX_PATH*2 ];
+ int ccFolder= steamapicontext->SteamApps()->GetAppInstallDir( 280, szPath, sizeof(szPath) );
+ if ( ccFolder > 0 )
+ {
+ V_AppendSlash( szPath, sizeof(szPath) );
+ V_strncat( szPath, "hl1", sizeof( szPath ) );
- ConVarRef mat_vsync( "mat_vsync" );
- mat_vsync.SetValue( 0 );
-#endif
+ g_pFullFileSystem->AddSearchPath( szPath, "HL1" );
+ g_pFullFileSystem->AddSearchPath( szPath, "GAME" );
+ }
}
+#endif
}
//-----------------------------------------------------------------------------