Commit graph

210 commits

Author SHA1 Message Date
Mitchell Richters
80da809e0c - Apply cl_noturnscaling CVAR from feaaf2c15a to GameInput::processVehicle(). 2023-09-28 22:16:29 +10:00
Mitchell Richters
e0e459216d - Reduce GameInput::processVehicle() interface by changing three bools to a bitfield. 2023-09-25 19:51:53 +10:00
Mitchell Richters
8d8c30d10e - Reset the crouch toggle only when loading a new game, not every time we clear out the input.
* We need to preserve the crouch toggle when loading saves.
* Deliberately not resetting during level transitions as each level in an episode is interconnecting.
2023-09-24 17:51:22 +10:00
Mitchell Richters
22077c5b50 - Ensure crouch_toggle is cleared when clearing all input. 2023-09-24 15:53:39 +10:00
Mitchell Richters
feaaf2c15a - Allow disabling turn scaling (turbo turn). 2023-09-24 14:15:50 +10:00
Mitchell Richters
29e021b5bf - Move crouch toggling back into the backend so the toggle key can be used as a swim key.
* Reverts 272dfa762d, but is a fresh implementation.
* I doubted anyone was doing this but apparently not.
* Exhumed needed a bit more work as it has very specific underwater checks.
2023-09-24 14:15:49 +10:00
Mitchell Richters
a3aa2e877e - Exhumed: Repair use key clearing issue from ed2c557297.
* It's important that the use button is cleared for Exhumed, just not in the game code like it was previously done.
* Fixes #971.
2023-09-23 09:51:45 +10:00
Mitchell Richters
52ab0fae19 - Duke: Allow reversing while moving forwards to act as the brake.
* Much more intuitive for controllers.
2023-04-25 11:30:48 +10:00
Mitchell Richters
918789705f - Duke: Use the player's angle when adjusting vehicle's HUD rotation. 2023-04-24 22:44:22 +10:00
Mitchell Richters
14629e7b2b - Clamp vehicle input to 1.5x the calculated velocity. 2023-04-24 22:18:40 +10:00
Mitchell Richters
11181f51f8 - Allow roll input through the packet system, giving us 6DOF for VR usage, etc. 2023-04-24 21:31:21 +10:00
Mitchell Richters
a731db95ae - Add initial support for up/down movement within the game, either by key or joystick axis.
* Started with Duke's jetpack, other games to follow for swimming, etc.
2023-04-23 19:53:45 +10:00
Mitchell Richters
e60e767232 - Break down some increasingly long lines in GameInput::processMovement(). 2023-04-23 19:19:26 +10:00
Mitchell Richters
175f858047 - Make scaletozero() static again within gameinput.cpp. 2023-04-23 09:06:31 +10:00
Mitchell Richters
0a90ed4802 - Remove some duplicated lines in PlayerAngles::doViewTilting(). 2023-04-23 08:51:14 +10:00
Mitchell Richters
b179079168 - Move constant from previous commit into the class with the other constants. 2023-04-22 22:45:12 +10:00
Mitchell Richters
df30c01472 - Rework cl_viewtilting 1 to be consistent across games.
* Setup before from when it was Exhumed-only assumed a 30Hz clock. Needed adjusted variables and setup for Shadow Warrior.
2023-04-22 21:40:57 +10:00
Mitchell Richters
6ba227ab8b - Spaces be damned! 2023-04-22 19:50:55 +10:00
Mitchell Richters
71d833f9ea - Make Exhumed's new view tilting features accessible for all games. 2023-04-22 19:34:53 +10:00
Mitchell Richters
bb19997a2c - Apply pitch/yaw input along-side the key inputs.
* Removes a lot of duplicated code.
2023-04-21 21:13:18 +10:00
Mitchell Richters
70dd565c50 - Slightly tune mouse formula in GameInput::processVehicle(). 2023-04-21 21:13:17 +10:00
Mitchell Richters
258ab0db89 - Exhumed: Initial setup of view rolling effects.
* `cl_exviewtilting 1` enables a console-like view rolling upon yaw input.
* `cl_exviewtilting 2` enables a Quake-like view rolling upon strafe input.
2023-04-21 21:13:17 +10:00
Mitchell Richters
2658af9fd0 - Use weapon enums when determining max slot numbers. 2023-04-05 10:22:18 +10:00
Mitchell Richters
0eba341ac1 - Remove GameInput::prepareHidInput() and GameInput::resetHidInput().
* Also reverts 23bff9f701, but changes the loop into a `memset()` call instead.
2023-04-04 20:07:06 +10:00
Mitchell Richters
d454455d22 - Move invertmouse CVARs into common code.
* Removes duplication of CVAR definitions between Raze and GZDoom.
2023-04-04 20:01:21 +10:00
Mitchell Richters
133c8fa80b - Only scale the mouse input in GameInput::processMovement(), where it's needed.
* Also fixes a potential signedness issue for `processVehicle()` if `m_yaw` is negatively set.
2023-04-04 09:53:43 +10:00
Mitchell Richters
a68fcfc71c - Remove GameInterface::getConsoleAngles(), it's not needed anymore. 2023-04-04 07:02:39 +10:00
Mitchell Richters
3ef431a428 - Make scaleAdjust a float since it's what's needed anyway. 2023-04-03 19:38:00 +10:00
Mitchell Richters
69c65dfe7e - Internalise InputPacket used in movement functions. 2023-04-03 19:35:35 +10:00
Mitchell Richters
dbba0abb2e - Move all mouse handling into GameInput class. 2023-04-03 18:47:14 +10:00
Mitchell Richters
8d11fef916 - Initial conversion of game input into class GameInput. 2023-04-03 18:46:36 +10:00
Mitchell Richters
23186cd8bb - Relocate processCrouchToggle(). 2023-04-03 18:38:10 +10:00
Mitchell Richters
31d3349d93 - Rearrange bools in processVehicleInput(). 2023-04-03 18:37:38 +10:00
Mitchell Richters
fb519e9c53 - Move PlayerAngles constants into the class. 2023-04-03 17:07:34 +10:00
Mitchell Richters
272dfa762d - Remove backend crouch toggle solution redeploy with Duke/Exhumed/Blood using new ESyncBit bit.
* I tried to make this work in 2020 but its been nothing but headache. It's something for the game to control via a flag, not the backend to determine.
* For SW, this restores its original implementation.
2023-04-02 18:32:40 +10:00
Mitchell Richters
ea4e850674 - Move remaining mouse CVARs from inputstate.cpp to gameinput.cpp. 2023-04-02 18:32:39 +10:00
Mitchell Richters
10cd63f383 - Use an FVector2 inside HIDInput. 2023-04-02 18:32:39 +10:00
Mitchell Richters
4387294aff - Eliminate the duplicate mouse storage since we have things in the right spot now. 2023-04-02 18:32:39 +10:00
Mitchell Richters
eeb67a2cdd - Move all mouse CVARs from inputstate.cpp to gameinput.cpp. 2023-04-02 18:32:39 +10:00
Mitchell Richters
64b05b6f06 - Move remaining CCMDs and non-inputstate related items to gameinput.cpp. 2023-04-02 18:32:38 +10:00
Mitchell Richters
43febd5aa1 - Stop passing inputBuffer around within gameinput.cpp since everything's local now. 2023-04-02 18:32:38 +10:00
Mitchell Richters
3c82014d0e - Move ApplyGlobalInput() into gameinput.cpp.
* Doesn't really belong in inputstate.cpp, it was just placed there in 2020 for lack of a better spot at the time.
2023-04-02 18:32:38 +10:00
Mitchell Richters
9e1ca0cb8f - Make the turbo turn functions static within gameinput.cpp. 2023-04-02 18:32:38 +10:00
Mitchell Richters
359371527b - Move Duke's vehicle input processor into gameinput.cpp. 2023-04-02 18:32:36 +10:00
Mitchell Richters
c13745efc8 - Remove the mouse input negation out of the event handler. 2023-04-02 18:24:05 +10:00
Mitchell Richters
b340807a6b - Remove now-unneeded inline wrapper getHidInput(). 2023-04-02 18:24:05 +10:00
Mitchell Richters
46b5977a6a - Recover two ESyncBit values for other uses.
* By masking aiming+centering, we have look bits :)
2023-04-02 18:24:05 +10:00
Mitchell Richters
70706d3da8 - Don't stop getting input when we're paused.
* This is the cause of the long-standing crouch toggle issues, as well as a few other things.
2023-03-29 13:20:55 +11:00
Mitchell Richters
6c2717fcde - Avoid testing if we're synchronising input twice in getInput(). 2023-03-27 20:01:56 +11:00
Mitchell Richters
88e6a6e894 - Rework ff652f454c slightly to accept an InputPacket pointer. 2023-03-22 20:08:53 +11:00