[TF2/HL2MP] Fixes for Sixense (Razer Hydra) Support (Draft)#1879
Draft
TrenchcoatCraig wants to merge 5 commits intoValveSoftware:masterfrom
Draft
[TF2/HL2MP] Fixes for Sixense (Razer Hydra) Support (Draft)#1879TrenchcoatCraig wants to merge 5 commits intoValveSoftware:masterfrom
TrenchcoatCraig wants to merge 5 commits intoValveSoftware:masterfrom
Conversation
…rce engine. When complete, this Pull Request should address Source 1 Issues ValveSoftware#1666, #2530, #5532, and #7302. Commit is a draft. What's changed: in_sixense.cpp - Updated the library check to look for and initialize the correct library based on OS and system architexture. - Updated includes and added binds for the Eureka Effect and the Taunt menu in TF2 (Taunt menu incomplete, 'lastinv' bind doesn't close menu as expected). - Added more console messages to initialization to identify and aid in troubleshooting. - Updated includes to look for sixense.h from the Sixense SDK instead of isixense.h which isn't public. in_sixense.h - Updated iSixenseAPI class and pointer to fix "not defined" error. - Updated includes to look for sixense.h from the Sixense SDK instead of isixense.h which isn't public. in_sixense_gesture_bindings.cpp - Updated TF_CLIENT_DLL default bindings to add missing controls '+attack3', '+use_action_slot_item', 'player_ready_toggle', and '+inspect'. - Rebinds right bumper to '+jump' (was '+taunt', taunt bind is now only active when the taunt menu is open; the default bind for which is up on the Right analog stick). Jump rebind made to have parity with default Steam Controller/Steam Deck grip buttons layout. - Updated includes to look for sixense.h from the Sixense SDK instead of isixense.h which isn't public. client_hl2mp.vpc - Added $PreprocessorDefinition for "$BASE;SIXENSE" to the $Compiler section. Disabled in SOURCESDK by default, just like client_tf.vpc. What needs to be done: in_sixense.cpp - Update input event structs to support more platforms than Win32 to allow for emulated mouse/keyboard input in the in-game menus. - Various changes to enable games to receive simultaneous input from Sixense device, keyboard and mouse, and Steam input API, allowing button inputs to be rebound via Steam Input instead of cfg file. - Resolve errors in Linux support (Failed to find factory in sixense module) - [TF] Update functions for Demoknight shield charges to allow for charge turning; charge turning is currently not possible with any shield when using Sixense input. - [TF] Add bind and update includes to allow for cancelling looping/moving taunts, currently not possible without reaching over to keyboard. - [TF] Add dedicated default binds for Halloween bumper car. Currently reuses TF's Sixense binds which maps bumper car turning to the inverse of camera movement and has other oddities. - [TF] Update to allow Contracker panel to be closed from the Sixense device (view of the panel can be closed, but panel remains open in background, locking player input). - (VALVE) Update other Source game VPCs to re-enable support for Sixense (Razer Hydra). How to set up: This commit is reliant on the official Sixense SDK (Steam AppID 42300) to operate. I am not the rights holder to the Sixense SDK. The Sixense SDK is subject to terms and conditions which prohibit open redistribution in uncompiled form (such as a Git repositiory like this one). As Source engine games have previously shipped with Sixense support in their 32 bit versions, Valve is already bound by the same or similar licensing terms as I am. Instead of including the necessary libraries and include directories with this commit which would be in violation of Sixense's terms, I will provide written instructions to recreate the setup needed for compiling with Sixense support. 1. In the original client_tf.vpc and the updated client_hl2mp.vpc I've provided, remove the exclamation mark ("!") from the front of the [!$SOURCESDK] Preprocessor Definition in the Compiler Configuration section of the respective VPC files. 2. In 'source-sdk-2013/src/thirdparty', create a new folder called 'sixensesdk' (case sensitive). Copy and paste the 'include' directory from your copy of the SixenseSDK into the new sixensesdk folder in the thirdparty directory. When complete, the path should be 'source-sdk-2013/src/thirdparty/sixensesdk/include/'. 3.1. For Windows 64-bit, obtain 'sixense_x64.dll' and 'sixense_utils_x64.dll' from the SixenseSDK/bin/x64 directory of the Sixense SDK, and copy them to your mod's 'source-sdk-2013/game/bin/x64' for mod development, or 'steamapps/common/Source SDK Base 2013 Multiplayer/bin/x64' for continuing on this Git Pull request. 3.2. For Linux 64 bit, obtain 'libsixense_x64.so' and 'libsixense_utils_x64.so' from the 'SixenseSDK/lib/linux_x64/release' directory of the Sixense SDK, and copy them to the directory 'steamapps/common/Source SDK Base 2013 Multiplayer/bin/linux64'. Loading the libraries from the mod's 'game/bin' directory doesn't appear to be possible, and setting $LD_ENVIRONMENT_PATH to a directory with the libraries manually provides inconsistent results. 3.3 (VALVE) Obtain the Windows 32 bit 'sixense.dll' and 'sixense_utils.dll' and copy them to the appropriate 32 bit engine directory (Sixense support is currently broken in 32 bit Windows binaries, and this will make sure the library build versions are the same between 32 bit and 64 bit.) 4. Compile as Release and hope I relayed the instructions correctly. (:
Removed specific game-related paths from .gitignore.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The changes needed to restore and reinstate Sixense (Razer Hydra) support in the Source engine. When complete, this Pull Request should address Source 1 Issues 1666, 2530, and 5532. Commit is a draft.
What's changed:
in_sixense.cpp
in_sixense.h
in_sixense_gesture_bindings.cpp
client_hl2mp.vpc
What needs to be done:
in_sixense.cpp
client_[GAME].vpc
How to set up:
This commit is reliant on the official Sixense SDK (Steam AppID 42300) to operate. I am not the rights holder to the Sixense SDK; I am explicitly identifying the Sixense SDK as being sourced from a third party, as per section 2.2 of the Contribution guidelines. I legally licensed a copy of the Sixense SDK as I have an instance of the Sixense SDK through my Steam library. The Sixense SDK is subject to terms and conditions which prohibit open redistribution of some files in uncompiled form (such as a public Git repository like this one).
As Source engine games have previously shipped with Sixense support in their 32-bit versions, Valve is already bound by the same or similar licensing terms as I am. Instead of including the necessary libraries and third party include directories with this commit which would be in violation of Sixense's terms, I will provide written instructions to recreate the setup needed for compiling with Sixense support. The license terms for the Sixense SDK are available here (Steam).
In the original client_tf.vpc and the updated client_hl2mp.vpc I've provided, remove the exclamation mark ("!") from the front of the [!$SOURCESDK] Preprocessor Definition in the Compiler Configuration section of the respective VPC files.
In 'source-sdk-2013/src/thirdparty', create a new folder called 'sixensesdk' (case sensitive). Copy and paste the 'include' directory from your copy of the SixenseSDK into the new sixensesdk folder in the thirdparty directory. When complete, the path should be 'source-sdk-2013/src/thirdparty/sixensesdk/include/'.
3.1. For Windows 64-bit, obtain 'sixense_x64.dll' and 'sixense_utils_x64.dll' from the SixenseSDK/bin/x64 directory of the Sixense SDK, and copy them to your mod's 'source-sdk-2013/game/bin/x64' for mod development, or 'steamapps/common/Source SDK Base 2013 Multiplayer/bin/x64' for continuing on this Git Pull request.
3.2. For Linux 64-bit, obtain 'libsixense_x64.so' and 'libsixense_utils_x64.so' from the 'SixenseSDK/lib/linux_x64/release' directory of the Sixense SDK, and copy them to the directory 'steamapps/common/Source SDK Base 2013 Multiplayer/bin/linux64'. Loading the libraries from the mod's 'game/bin' directory doesn't appear to be possible, and setting $LD_ENVIRONMENT_PATH to a directory with the libraries manually provides inconsistent results.
3.3 (VALVE) Obtain the Windows 32-bit 'sixense.dll' and 'sixense_utils.dll' from the Sixense SDK and copy them to the appropriate 32-bit engine directory (Sixense support is currently broken in 32-bit Windows binaries, and this will make sure the library build versions are the same between 32-bit and 64-bit.)