From beaae8ac45a2f322a792404092d4482065bef7ef Mon Sep 17 00:00:00 2001 From: Joe Ludwig Date: Tue, 3 Dec 2013 08:54:16 -0800 Subject: 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 --- mp/src/game/server/entity_tools_server.cpp | 36 +++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) (limited to 'mp/src/game/server/entity_tools_server.cpp') diff --git a/mp/src/game/server/entity_tools_server.cpp b/mp/src/game/server/entity_tools_server.cpp index e1888123..5032ca04 100644 --- a/mp/src/game/server/entity_tools_server.cpp +++ b/mp/src/game/server/entity_tools_server.cpp @@ -409,13 +409,39 @@ void CC_Ent_Keyvalue( const CCommand &args ) return; } - int nID = atoi( args[1] ); + CBasePlayer *pPlayer = ToBasePlayer( UTIL_GetCommandClient() ); + CBaseEntity *pEnt; + if ( FStrEq( args[1], "" ) || FStrEq( args[1], "!picker" ) ) + { + if (!pPlayer) + return; + + extern CBaseEntity *FindPickerEntity( CBasePlayer *pPlayer ); + pEnt = FindPickerEntity( pPlayer ); - CBaseEntity *pEnt = g_ServerTools.FindEntityByHammerID( nID ); - if ( !pEnt ) + if ( !pEnt ) + { + ClientPrint( pPlayer, HUD_PRINTCONSOLE, "No entity in front of player.\n" ); + return; + } + } + else if ( FStrEq( args[1], "!self" ) || FStrEq( args[1], "!caller" ) || FStrEq( args[1], "!activator" ) ) { - Msg( "Entity ID %d not found.\n", nID ); - return; + if (!pPlayer) + return; + + pEnt = pPlayer; + } + else + { + int nID = atoi( args[1] ); + + pEnt = g_ServerTools.FindEntityByHammerID( nID ); + if ( !pEnt ) + { + Msg( "Entity ID %d not found.\n", nID ); + return; + } } int nArg = 2; -- cgit v1.2.3