aboutsummaryrefslogtreecommitdiff
path: root/sp/src/game/client/clientmode_shared.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 /sp/src/game/client/clientmode_shared.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 'sp/src/game/client/clientmode_shared.cpp')
-rw-r--r--sp/src/game/client/clientmode_shared.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/sp/src/game/client/clientmode_shared.cpp b/sp/src/game/client/clientmode_shared.cpp
index a1d1127d..b6dee29c 100644
--- a/sp/src/game/client/clientmode_shared.cpp
+++ b/sp/src/game/client/clientmode_shared.cpp
@@ -36,7 +36,7 @@
#include <vgui/ILocalize.h>
#include "hud_vote.h"
#include "ienginevgui.h"
-#include "headtrack/isourcevirtualreality.h"
+#include "sourcevr/isourcevirtualreality.h"
#if defined( _X360 )
#include "xbox/xbox_console.h"
#endif
@@ -208,6 +208,7 @@ static void __MsgFunc_VGUIMenu( bf_read &msg )
if ( count > 0 )
{
KeyValues *keys = new KeyValues("data");
+ //Msg( "MsgFunc_VGUIMenu:\n" );
for ( int i=0; i<count; i++)
{
@@ -216,10 +217,25 @@ static void __MsgFunc_VGUIMenu( bf_read &msg )
msg.ReadString( name, sizeof(name) );
msg.ReadString( data, sizeof(data) );
+ //Msg( " %s <- '%s'\n", name, data );
keys->SetString( name, data );
}
+ // !KLUDGE! Whitelist of URL protocols formats for MOTD
+ if (
+ !V_stricmp( panelname, PANEL_INFO ) // MOTD
+ && keys->GetInt( "type", 0 ) == 2 // URL message type
+ ) {
+ const char *pszURL = keys->GetString( "msg", "" );
+ if ( Q_strncmp( pszURL, "http://", 7 ) != 0 && Q_strncmp( pszURL, "https://", 8 ) != 0 )
+ {
+ Warning( "Blocking MOTD URL '%s'; must begin with 'http://' or 'https://'\n", pszURL );
+ keys->deleteThis();
+ return;
+ }
+ }
+
viewport->SetData( keys );
keys->deleteThis();
@@ -496,7 +512,7 @@ bool ClientModeShared::ShouldBlackoutAroundHUD()
//-----------------------------------------------------------------------------
-// Purpose: Allows the client mode to override mouse control stuff in headtrack
+// Purpose: Allows the client mode to override mouse control stuff in sourcevr
//-----------------------------------------------------------------------------
HeadtrackMovementMode_t ClientModeShared::ShouldOverrideHeadtrackControl()
{