Christoph Oelckers
c1d603e1e9
- backend update from GZDoom.
2022-10-02 20:33:18 +02:00
Mitchell Richters
78fcf2b4f0
- Move invertmouse
and invertmousex
CVARs from gameinput.cpp
to inputstate.cpp
.
...
* Old setup was inverting the entire player's horz/avel, even for joystick input while not inverting `mousemovex` or `mousemovey` at all.
2022-07-23 10:37:32 +10:00
Mitch Richters
c6774d5efd
- Duke/RR: Re-add micro-movement cancellation for RR's vehicles that was dropped in 466bc84697
.
2021-12-26 23:09:50 +01:00
Christoph Oelckers
016a907c20
- replaced vec2_t with FVector2.
2021-12-14 10:07:06 +01:00
Mitch Richters
e491d15ff9
- Move InputScale()
out of inputstate.cpp and into i_time.cpp
as I_GetInputFrac()
to make it available to GZDoom for potential future requirements.
...
* As part of this, feed the output of `I_GetInputFrac()` to `gi->GetInput()` instead of having each game's virtual override calling it locally.
2021-11-29 00:55:01 +01:00
Mitch Richters
1228cb6044
- InputState::AddEvent()
: Partially revert changes performed in 4d629e7de8
that were believed not necessary. This functionality is still needed in some of Exhumed's cutscenes that are performed in-engine and not as a screenjob.
2021-11-19 08:11:32 +11:00
Mitch Richters
4d629e7de8
- Make screenjob valid keys for skipping ignore the Alt key as its used for modifiers, and special keys like the screenshot bind.
...
* Partially revert 8bb13bc4c2
as its changes are no longer needed.
* Partially revert 9e40e49c2c
as its changes are no longer needed.
* Fixes #577 .
2021-11-18 20:59:07 +11:00
Mitch Richters
6581d9d709
- InputScale()
: Tidy up some math I just put in.
...
* Time for bed... *yarns*.
2021-11-10 22:23:59 +11:00
Mitch Richters
3c4afaa6ee
- InputScale()
: Add enabled-by-default scaler to returned value from function to correct drift that occurs as the frame-rate increases, taking into account different scaling ratios needed for differing ticrates.
2021-11-10 20:27:19 +11:00
Mitch Richters
5a33caa635
- InputScale()
: Add enabled-by-default scaler to returned value from function to correct drift that occurs as the frame-rate increases, taking into account different scaling ratios needed for differing ticrates.
2021-11-10 20:13:06 +11:00
Mitchell Richters
6894be4ad1
- Use the new isSWALL()
wrapper everywhere.
2021-07-11 12:40:01 +10:00
Mitchell Richters
c076310e34
- InputState::ClearAllInput()
: Only clear crouch_toggle
bool if outside of a level, and resend SB_CROUCH
sync bit if inside a level and crouch_toggle
is true.
...
* Fixes #287 .
2021-04-01 13:46:16 +11:00
Christoph Oelckers
99f1f0952a
- little bit of engine cleanup.
2021-02-25 12:16:21 +01:00
Mitchell Richters
25eaeff0db
- Wrap all g_gameType & GAMEFLAG_BLOOD
checks into isBlood()
inline.
2021-01-02 14:46:58 +11:00
Mitchell Richters
4aae71f0ee
- InputState::ClearAllInput(): Call resetTurnHeldAmt()
when clearing input.
2021-01-02 10:00:29 +11:00
Christoph Oelckers
ae36ea88c3
- wrap all checks of cl_syncinput in an inline function.
2020-11-30 23:40:16 +01:00
Christoph Oelckers
ed8266df0b
- fixed bad args check in WarpToCoords CCMD.
2020-11-29 16:06:15 +01:00
Christoph Oelckers
a34f5debe8
- route the shared control CCMDs through the game interface instead of registering local variants for each game.
2020-11-29 13:35:09 +01:00
Mitchell Richters
f9f365a593
- Ensure crouch_toggle
bool from 6e3d414b3c
is serialised when saving game, and cleared when InputState::ClearAllInput()
is called.
2020-11-08 07:30:48 +11:00
Mitchell Richters
6e3d414b3c
- inputstate.cpp: Move checkCrouchToggle()
from gameinput.ccp into ApplyGlobalInput()
and use static bool for crouch toggling vs. game-side bool.
2020-11-07 18:16:16 +11:00
Mitchell Richters
c9708a5464
- CONTROL_GetInput()
: Reverse polarity of dx/dz and update processMovement()
appropriately.
2020-11-07 09:56:57 +11:00
Mitchell Richters
44e4c5ff78
- Fix joystick scaling following shift to fixedhoriz and binangle.
...
* Remove joystick scaling from `CONTROL_GetInput()`.
* Store turnspeed as constant at top of `processMovement()` and use it for joystick yaw/pitch scaling. This adds the advantage of having the out-of-box turning speed match the keyboard's turn speed and also attenuates when the player is not running.
2020-10-09 11:34:14 +11:00
Mitchell Richters
babd7b9556
- InputState: Proposed new sensitivity dividers now that mouse input is based on true pitch and true angle.
2020-10-07 23:25:36 +11:00
Christoph Oelckers
a558703740
- bumped up the vertical mouse movement factor to 1/5 from 1/8.
...
1/8 was far too low for an average mouse
2020-09-29 18:14:22 +02:00
Mitchell Richters
0bb9904338
- Tune mouse input following changes in b57e13ff62
.
...
* Reduce `hidInput->mouseturny` to previous scaling (0.25 of incoming input).
* Change `hidInput->mouseturnx` to be 0.5 of incoming input (33% slower than b57e13ff62
, but matches what other ports by providing a 2:1 scale).
* Remove further divisions beyond m_side and m_forward and adjust code in `processMovement()` accordingly.
* Change scaling for `mousevelscale` in `processMovement()` to be 1/160th of keymove. Slightly lower for Duke and a lot faster for Blood where it's needed.
2020-09-29 21:02:36 +10:00
Christoph Oelckers
b57e13ff62
- mouse code update.
...
May still need some tweaking of the factors.
2020-09-28 22:36:43 +02:00
Mitchell Richters
71d667cdc9
- ApplyGlobalInput()
: Fix const issue.
2020-09-25 13:33:44 +10:00
Mitchell Richters
aa14ee1232
- InputState: Scale dyaw/dpitch with regards to ticrate. All testing on initial uplift was with Duke at 30Hz. SW running at 40Hz therefore is not at the same speed as the others.
2020-09-25 00:25:49 +10:00
Christoph Oelckers
d74d65bece
- clear the 2D drawers in the correct place.
2020-09-15 21:52:02 +02:00
Christoph Oelckers
38cc094ac3
- adapt ClearAllInput to new globalized code.
2020-09-10 23:35:42 +02:00
Mitchell Richters
fa9fa88fce
Merge branch 'back_to_basics2' into InputStuffs
...
# Conflicts:
# source/core/gamestruct.h
# source/games/duke/src/duke3d.h
# source/sw/src/input.cpp
# source/sw/src/player.cpp
2020-09-07 07:51:37 +10:00
Christoph Oelckers
18b39fd952
- first stage of generic automap code.
...
Lines and textures get rendered, not all colors are correct - sprites yet to do...
2020-09-06 20:49:43 +02:00
Mitchell Richters
290e615807
- Move Duke's input scaling for unsynchronised input to backend as InputScale()
.
2020-09-06 20:19:26 +10:00
Mitchell Richters
722537a1f0
- InputState: Make CONTROL_GetInput()
return an object instead of accepting a pointer and provide to games as a function parameter.
...
* Provide read-only/const results from `CONTROL_GetInput()` so games can't change received input.
* Change non-descript `info` to `hidInput` (Human Interface Device).
* Remove a few unused prototypes.
2020-09-06 20:18:26 +10:00
Christoph Oelckers
3204a3e5fc
- negated the meaning of SB_AIMMODE.
...
This is because 'classic' aim mode will reset the view if the mouseaim key is not pressed.
The problem with this is that an empty input packet will trigger a view reset. If the meaning is inverted the default aim mode is free mouse view which doesn't try to alter any view state and is therefore preferable for an empty packet.
Fixes #292
2020-08-31 20:51:22 +02:00
Christoph Oelckers
765f211e05
- things are mostly working again.
...
Rendering produces an image again, input gets properly processed, but unsynchronised mouse input isn't properly applied yet.
2020-08-30 19:59:46 +02:00
Christoph Oelckers
367b4ce051
- this should be all we need from GZDoom to hook up the main loop.
2020-08-30 09:32:34 +02:00
Christoph Oelckers
e3839b01bc
- removed in_mousesmoothing.
...
This not only was redundant with m_filter, even worse, it was in the wrong place.
Control_GetInput is used to read the current input state from the backend and can get called at uneven intervals, or even multiple times during the same frame, so smoothing the movement here can lead to erratic behavior.
With this change CONTROL_GetInput will return the same data unless it gets updated between calls.
2020-08-29 18:37:22 +02:00
Christoph Oelckers
56d0647412
- migrated the last 3 remaining UI controls to CCMDs.
2020-08-29 17:49:15 +02:00
Christoph Oelckers
694444b62a
- converted the remaining input bits.
...
Looks like it is working in all games except Blood (not that it surprises me that it's Blood again which has issues...)
2020-08-29 13:32:55 +02:00
Christoph Oelckers
dc1f56e8f9
Merge remote-tracking branch 'remotes/Github_private/back_to_basics2' into Packet
...
# Conflicts:
# source/core/inputstate.cpp
# source/exhumed/src/exhumed.h
2020-08-29 01:19:48 +02:00
Christoph Oelckers
fe7f3a2f9e
- handle the run key.
2020-08-29 00:57:07 +02:00
Christoph Oelckers
b9e0f493b2
- transitioned the 5 primary action keys: Open, Jump, Crouch and Fire/AltFire.
2020-08-28 23:25:08 +02:00
Christoph Oelckers
847fa48724
- cleaned out the remaining parts of baselayer.h
...
In particular this means to remove the option to disable widescreen aspect ratios. The way this was handled makes no sense with the current render backend.
The aspect ratio code will have to be redone entirely to properly obey the backend's settings.
2020-08-28 09:06:49 +02:00
Christoph Oelckers
d62d2eaec7
- processed all remaining local input CCMDs and removed some bits only needed for multiplayer.
...
These MP bits should be reimplemented as network commands later, they only take up valuable space in the bit field.
2020-08-28 00:03:35 +02:00
Christoph Oelckers
ee7d558282
- removed the remains of sending pause with the input packets.
...
None of this was really working anymore, but will have to be rethought once a network stream exists again.
But even then, this is better sent as a separate command, and in MP only.
2020-08-27 22:38:52 +02:00
Christoph Oelckers
447573aa36
- consolidation of invprev, invnext and invuse.
2020-08-27 22:19:24 +02:00
Christoph Oelckers
43de0d8312
- consolidation of inventory item activation through hotkeys.
...
This also adds hotkeys for Exhumed which never implemented them.
2020-08-27 21:25:09 +02:00
Mitchell Richters
8bb13bc4c2
- InputState: Exclude volume keys from setting AnyKeyStatus
to true.
2020-08-27 13:05:05 +02:00
Christoph Oelckers
10df3e094a
- rework of weapon input to use common features in shared code.
...
This also adds stubs for all unimplemented features in the games for easier addition.
2020-08-27 00:53:35 +02:00